Don't try to execut the pkg_info phase if DEFINED_PHASES is available and
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:01:38 +0000 (07:01 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:01:38 +0000 (07:01 -0000)
it shows that the phase is undefined. (trunk r13305)

svn path=/main/branches/2.1.6/; revision=13476

pym/_emerge/__init__.py

index e3b7f2fb92f5be1c601b02918da00a985bc1e7cd..f0ece4e8cccadab842e44819449b74be63cedc39 100644 (file)
@@ -13426,6 +13426,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)
 
@@ -13524,6 +13525,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):