Skip to content

Commit

Permalink
Fix setup line for packages without a prefix folder
Browse files Browse the repository at this point in the history
Previously in a cleanup commit 74c0833 the support for packages that
didn't have a prefix folder was unintentionally removed. This change
updates the setup call for non-R packages to add the support back.

Signed-off-by: William Douglas <[email protected]>
  • Loading branch information
bryteise committed Jul 31, 2024
1 parent 356da62 commit 0c573b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions autospec/specfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,16 @@ def write_prep(self):
self._write_strip(f"gpg --homedir .gnupg --status-fd 1 --verify {self.config.signature_macro} %{{SOURCE0}} > gpg.status")
self._write_strip(f"grep -E '^\\[GNUPG:\\] (GOODSIG|EXPKEYSIG) {self.keyid}' gpg.status")
self.write_prep_prepend()
prefix = self.content.prefixes[self.url]
if self.config.default_pattern == 'R':
prefix = self.content.tarball_prefix
self._write_strip("%setup -q -n " + prefix)
else:
self._write_strip("%setup -q -n " + prefix)
prefix = self.content.prefixes[self.url]
if not prefix:
prefix = os.path.splitext(os.path.basename(self.url))[0]
self._write_strip("%setup -q -c -n " + prefix)
else:
self._write_strip("%setup -q -n " + prefix)
for archive in self.config.sources["archive"]:
# Handle various archive types
extract_cmd = 'tar xf {}'
Expand Down

0 comments on commit 0c573b6

Please sign in to comment.