From 56f5e5ff3a838e5fcaa519ef2aa042990ab83404 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 24 Sep 2011 17:18:59 +0200 Subject: [PATCH] Display generated packages at the end of the build. --- pakfire/builder.py | 11 ++++++++++- pakfire/packages/make.py | 4 ++++ pakfire/packages/packager.py | 4 +++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pakfire/builder.py b/pakfire/builder.py index 15786d214..0149e797f 100644 --- a/pakfire/builder.py +++ b/pakfire/builder.py @@ -590,6 +590,7 @@ class BuildEnviron(object): finally: self._umountall() + class Builder(object): def __init__(self, pakfire, filename, resultdir, **kwargs): self.pakfire = pakfire @@ -697,10 +698,18 @@ class Builder(object): # Package the result. # Make all these little package from the build environment. logging.info(_("Creating packages:")) + pkgs = [] for pkg in reversed(self.pkg.packages): packager = packages.packager.BinaryPackager(self.pakfire, pkg, self, self.buildroot) - packager.run(self.resultdir) + pkg = packager.run(self.resultdir) + pkgs.append(pkg) + logging.info("") + + for pkg in sorted(pkgs): + for line in pkg.dump(long=True).splitlines(): + logging.info(line) + logging.info("") logging.info("") def build_stage(self, stage): diff --git a/pakfire/packages/make.py b/pakfire/packages/make.py index b73aa5a93..66cc0bf02 100644 --- a/pakfire/packages/make.py +++ b/pakfire/packages/make.py @@ -377,6 +377,10 @@ class Makefile(MakefileBase): shutil.copy2(_filename, filename) + @property + def inst_size(self): + return 0 + class MakefilePackage(MakefileBase): def __init__(self, pakfire, name, lexer): diff --git a/pakfire/packages/packager.py b/pakfire/packages/packager.py index dd45c8ff4..16ed55fe8 100644 --- a/pakfire/packages/packager.py +++ b/pakfire/packages/packager.py @@ -536,6 +536,8 @@ class BinaryPackager(Packager): except OSError: shutil.copy2(tempfile, resultfile) + return BinaryPackage(self.pakfire, self.pakfire.repos.dummy, resultfile) + class SourcePackager(Packager): def create_metafile(self, datafile): @@ -592,7 +594,7 @@ class SourcePackager(Packager): datafile.add(file, "files/%s" % os.path.basename(file)) # Add all files in the package directory. - for file in self.pkg.files: + for file in sorted(self.pkg.files): arcname = os.path.relpath(file, self.pkg.path) datafile.add(file, arcname) -- 2.39.5