Fix readonly variable assignment for PORTAGE_BINPKG_TMPFILE when
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Sep 2010 19:04:25 +0000 (12:04 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 1 Oct 2010 00:54:03 +0000 (17:54 -0700)
ebuild(1) calls the 'package' phase.

bin/misc-functions.sh
pym/_emerge/EbuildPhase.py

index d8242b7c18ba26a88576e1a5ae081d6c0319edee..b266764f9909e6877f963a5e556163cc8e9e7a09 100755 (executable)
@@ -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"
index e3bc076c9ca3e3c4efc134d7166f085a6310b0d8..2135c62b23ed45770085f3ffddc99c7778a0d2fd 100644 (file)
@@ -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)