Skip to content

Commit

Permalink
rpmbuild: extract spec into resultdir regardless of the current direc…
Browse files Browse the repository at this point in the history
…tory
  • Loading branch information
FrostyX committed Jun 13, 2023
1 parent 63d8869 commit 8f17261
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rpmbuild/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ def build_srpm(args, config):
os.listdir(resultdir)))

# extract spec file from SRPM
subprocess.run(f"rpm2archive -n < {locate_srpm(resultdir)} | tar xf - '*.spec'", shell=True, check=False)
cmd = f"rpm2archive -n < {locate_srpm(resultdir)} | tar xf - '*.spec'"
subprocess.run(cmd, shell=True, check=False, cwd=resultdir)

with open(os.path.join(resultdir, 'success'), "w") as success:
success.write("done")
Expand Down

0 comments on commit 8f17261

Please sign in to comment.