spec: Add binpkg_blacklist option for troublesome packages
authorW. Trevor King <wking@tremily.us>
Mon, 15 Apr 2013 22:38:26 +0000 (18:38 -0400)
committerW. Trevor King <wking@tremily.us>
Tue, 16 Apr 2013 01:26:14 +0000 (21:26 -0400)
For packages that don't use EAPI-5's sub-slots to track ABI
dependencies, binary packages may go stale without Portage noticing.
You can use this new option to list packages that may be troublesome.
Listed packages will be removed from the pkgcache, and rebuilt from
scratch for your seed.

If binpkg_blacklist is unset in your spec file, it defaults to
including the following packages:

* dev-libs/gcc: see, for example,
  http://mid.gmane.org/20130412011158.GB17116@odin.tremily.us
* media-libs/mesa: see, for example, #454184

modules/generic_stage_target.py
targets/support/chroot-functions.sh

index 31cb025e6745a3858acacdf583d6df7dbaaf330c..4fbbb44ae280699ec3b77f25eadb7a26c6fab44d 100644 (file)
@@ -16,7 +16,9 @@ class generic_stage_target(generic_target):
                self.valid_values.extend(["version_stamp","target","subarch",\
                        "rel_type","profile","snapshot","source_subpath","portage_confdir",\
                        "cflags","cxxflags","ldflags","cbuild","hostuse","portage_overlay",\
-                       "distcc_hosts","makeopts","pkgcache_path","kerncache_path"])
+                       "distcc_hosts","makeopts","pkgcache_path","kerncache_path",
+                       'binpkg_blacklist',
+                       ])
 
                self.set_valid_build_kernel_vars(addlargs)
                generic_target.__init__(self,myspec,addlargs)
index 35ffbaa558b96971719648827cb6b76807d8d58b..95b7870571d8d3b2a5a7951963888658afd10ea1 100644 (file)
@@ -261,6 +261,11 @@ run_merge() {
        export EPAUSE_IGNORE=0
        export CONFIG_PROTECT="-*"
 
+       default_binpkg_blacklist="dev-libs/gcc media-libs/mesa"
+       for binpkg in ${clst_binpkg_blacklist-${default_binpkg_blacklist}}; do
+               rm -vf "/usr/portage/packages/${binpkg}"*
+       done
+
        if [ -n "${clst_VERBOSE}" ]
        then
                echo "ROOT=${ROOT} emerge ${clst_myemergeopts} -pt $@" || exit 1