From deff6f60d339e198aea364dbbd0ace5bd2b4d818 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 30 Sep 2010 12:04:25 -0700 Subject: [PATCH] Fix readonly variable assignment for PORTAGE_BINPKG_TMPFILE when ebuild(1) calls the 'package' phase. --- bin/misc-functions.sh | 2 +- pym/_emerge/EbuildPhase.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index d8242b7c1..b266764f9 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -877,7 +877,7 @@ dyn_package() { # for $PKGDIR and/or $PKGDIR/All. export SANDBOX_ON="0" [ -z "${PORTAGE_BINPKG_TMPFILE}" ] && \ - PORTAGE_BINPKG_TMPFILE="${PKGDIR}/${CATEGORY}/${PF}.tbz2" + die "PORTAGE_BINPKG_TMPFILE is unset" mkdir -p "${PORTAGE_BINPKG_TMPFILE%/*}" || die "mkdir failed" tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS -C "${D}" . | \ $PORTAGE_BZIP2_COMMAND -c > "$PORTAGE_BINPKG_TMPFILE" diff --git a/pym/_emerge/EbuildPhase.py b/pym/_emerge/EbuildPhase.py index e3bc076c9..2135c62b2 100644 --- a/pym/_emerge/EbuildPhase.py +++ b/pym/_emerge/EbuildPhase.py @@ -73,6 +73,12 @@ class EbuildPhase(CompositeTask): msg.append("USE: %s" % use) self._elog('einfo', msg) + if self.phase == 'package': + if 'PORTAGE_BINPKG_TMPFILE' not in self.settings: + self.settings['PORTAGE_BINPKG_TMPFILE'] = \ + os.path.join(self.settings['PKGDIR'], + self.settings['CATEGORY'], self.settings['PF']) + '.tbz2' + if self.phase == 'prerm': env_extractor = BinpkgEnvExtractor(background=self.background, scheduler=self.scheduler, settings=self.settings) -- 2.26.2