Skip to content

Commit

Permalink
Arpa builder saves RPMS and SRPMS file #53
Browse files Browse the repository at this point in the history
  • Loading branch information
edigiacomo committed Aug 25, 2022
1 parent 2532ee5 commit 7f7cc32
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 @@ -195,6 +195,19 @@ def build_in_container(self) -> 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 7f7cc32

Please sign in to comment.