diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-30 12:04:25 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-30 17:54:03 -0700 |
commit | deff6f60d339e198aea364dbbd0ace5bd2b4d818 (patch) | |
tree | 053ca92b9c31d07fa80641cc6363e33bf43add9e | |
parent | 874479989c83d0c8922810619fc971e3993dfb6a (diff) | |
download | portage-deff6f60d339e198aea364dbbd0ace5bd2b4d818.tar.gz portage-deff6f60d339e198aea364dbbd0ace5bd2b4d818.tar.bz2 portage-deff6f60d339e198aea364dbbd0ace5bd2b4d818.zip |
Fix readonly variable assignment for PORTAGE_BINPKG_TMPFILE when
ebuild(1) calls the 'package' phase.
-rwxr-xr-x | bin/misc-functions.sh | 2 | ||||
-rw-r--r-- | pym/_emerge/EbuildPhase.py | 6 |
2 files changed, 7 insertions, 1 deletions
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) |