From: Zac Medico Date: Thu, 30 Sep 2010 19:04:25 +0000 (-0700) Subject: Fix readonly variable assignment for PORTAGE_BINPKG_TMPFILE when X-Git-Tag: v2.1.9.13~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=deff6f60d339e198aea364dbbd0ace5bd2b4d818;p=portage.git Fix readonly variable assignment for PORTAGE_BINPKG_TMPFILE when ebuild(1) calls the 'package' phase. --- 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)