mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-15 03:41:16 +01:00
Fixed change to root privileges #152
This commit is contained in:
parent
cbd03a4a98
commit
45434a34d7
1 changed files with 7 additions and 3 deletions
|
@ -179,13 +179,17 @@ class Slackbuilds:
|
||||||
def build_the_script(self, path: str, name: str):
|
def build_the_script(self, path: str, name: str):
|
||||||
""" Run the .SlackBuild script. """
|
""" Run the .SlackBuild script. """
|
||||||
folder = f'{path}/{name}/'
|
folder = f'{path}/{name}/'
|
||||||
slackbuild = f'./{name}.SlackBuild'
|
execute = f'{folder}./{name}.SlackBuild'
|
||||||
execute = folder + slackbuild
|
|
||||||
|
# Change to root privileges
|
||||||
|
os.chown(folder, 0, 0)
|
||||||
|
for file in os.listdir(folder):
|
||||||
|
os.chown(f'{folder}{file}', 0, 0)
|
||||||
|
|
||||||
if '--jobs' in self.flags:
|
if '--jobs' in self.flags:
|
||||||
self.set_makeflags()
|
self.set_makeflags()
|
||||||
|
|
||||||
stdout = subprocess.call(execute)
|
stdout = subprocess.call(execute, shell=True)
|
||||||
|
|
||||||
if stdout > 0:
|
if stdout > 0:
|
||||||
raise SystemExit(stdout)
|
raise SystemExit(stdout)
|
||||||
|
|
Loading…
Reference in a new issue