generic_stage_target: default {PORT,PKG,DIST}DIR
authorZac Medico <zmedico@gentoo.org>
Wed, 31 Jul 2013 04:46:48 +0000 (21:46 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 8 Aug 2013 02:31:00 +0000 (19:31 -0700)
This provides forward compatiblity so that stage builds do not break
in the future when portage changes the default PORTDIR, PKGDIR, and
DISTDIR locations (bug #378603).

Also, it provides backward compatibility for various tools that require
PORTDIR to be defined in make.conf, such as the following:

gentoo-bashcomp - bug #478444
euse - bug #474574
euses and ufed - bug #478318

X-Gentoo-Bug: 479062
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=479062
Reviewed-by: Matt Turner <mattst88@gmail.com>
modules/generic_stage_target.py

index 8f3c05a33a9dc9d30fc9fee403bf2b155f8b89cc..848aca2f8616574ce1a8cdc0d1c4cf33c6620bb8 100644 (file)
@@ -1064,6 +1064,10 @@ class generic_stage_target(generic_target):
                                                "/use will cause portage to ignore"
                                        print "\tpackage.use in the profile and portage_confdir. You've been warned!"
 
+                       myf.write('PORTDIR="/usr/portage"\n')
+                       myf.write('DISTDIR="${PORTDIR}/distfiles"\n')
+                       myf.write('PKGDIR="${PORTDIR}/packages"\n')
+
                        """ Setup the portage overlay """
                        if "portage_overlay" in self.settings:
                                myf.write('PORTDIR_OVERLAY="/usr/local/portage"\n')