Don't try to execut the pkg_info phase if DEFINED_PHASES is available and
authorZac Medico <zmedico@gentoo.org>
Wed, 8 Apr 2009 20:48:08 +0000 (20:48 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 8 Apr 2009 20:48:08 +0000 (20:48 -0000)
it shows that the phase is undefined.

svn path=/main/trunk/; revision=13305

pym/_emerge/__init__.py

index b53c2bd95c4f0be3a6bfc2caae959381ebc1433c..6b526564a0c189bcd2d5ee38f5ae53be551d5efe 100644 (file)
@@ -13602,6 +13602,7 @@ def action_info(settings, trees, myopts, myfiles):
                # the current config)
                mydesiredvars = [ 'CHOST', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS' ]
                auxkeys = mydesiredvars + list(vardb._aux_cache_keys)
+               auxkeys.append('DEFINED_PHASES')
                global_vals = {}
                pkgsettings = portage.config(clone=settings)
 
@@ -13700,6 +13701,10 @@ def action_info(settings, trees, myopts, myfiles):
                                                print "%s=\"%s\"" % (myvar, " ".join(mylist))
                        print
 
+                       if metadata['DEFINED_PHASES']:
+                               if 'info' not in metadata['DEFINED_PHASES'].split():
+                                       continue
+
                        print ">>> Attempting to run pkg_info() for '%s'" % pkg.cpv
                        ebuildpath = vardb.findname(pkg.cpv)
                        if not ebuildpath or not os.path.exists(ebuildpath):