Skip to content

Commit

Permalink
Merge pull request #54 from ARPA-SIMC/issue53
Browse files Browse the repository at this point in the history
Arpa builder saves RPMS and SRPMS file #53
  • Loading branch information
spanezz authored Aug 25, 2022
2 parents 8bff6a7 + 7f7cc32 commit 74e4eb8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions moncic/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,19 @@ def build_in_container(self, workdir: str) -> Optional[int]:

return None

def collect_artifacts(self, container: Container, destdir: str):
user = UserConfig.from_sudoer()
patterns = (
"RPMS/*/*.rpm",
"SRPMS/*.rpm",
)
basedir = os.path.join(container.get_root(), "root/rpmbuild")
for pattern in patterns:
for file in glob.glob(os.path.join(basedir, pattern)):
filename = os.path.basename(file)
log.info("Copying %s to %s", filename, destdir)
link_or_copy(file, destdir, user=user)


class SourceInfo(NamedTuple):
srcname: str
Expand Down

0 comments on commit 74e4eb8

Please sign in to comment.