Reorganize emerge --info <atom> display, and make sure that the "cpv was
authorZac Medico <zmedico@gentoo.org>
Wed, 8 Apr 2009 20:41:03 +0000 (20:41 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 8 Apr 2009 20:41:03 +0000 (20:41 -0000)
built with the following" line is shown for every package.

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

pym/_emerge/__init__.py

index 5c7f62d3c9bae51542517cafc37d83c992633dac..b53c2bd95c4f0be3a6bfc2caae959381ebc1433c 100644 (file)
@@ -13635,16 +13635,8 @@ def action_info(settings, trees, myopts, myfiles):
                                if valuesmap[myvar] != global_vals[myvar]:
                                        diff_values[myvar] = valuesmap[myvar]
 
-                       # If a difference was found, print the info for
-                       # this package.
-                       if diff_values:
-                               # Print package info
-                               print "%s was built with the following:" % pkg.cpv
-                               for myvar in mydesiredvars:
-                                       if myvar in diff_values:
-                                               mylist = list(diff_values[myvar])
-                                               mylist.sort()
-                                               print "%s=\"%s\"" % (myvar, " ".join(mylist))
+                       print "\n%s was built with the following:" % \
+                               colorize("INFORM", str(pkg.cpv))
 
                        pkgsettings.setcpv(pkg)
                        forced_flags = set(chain(pkgsettings.useforce,
@@ -13697,6 +13689,17 @@ def action_info(settings, trees, myopts, myfiles):
                                print '%s="%s"' % (varname, ' '.join(str(f) for f in flags)),
                        print
 
+                       # If a difference was found, print the info for
+                       # this package.
+                       if diff_values:
+                               # Print package info
+                               for myvar in mydesiredvars:
+                                       if myvar in diff_values:
+                                               mylist = list(diff_values[myvar])
+                                               mylist.sort()
+                                               print "%s=\"%s\"" % (myvar, " ".join(mylist))
+                       print
+
                        print ">>> Attempting to run pkg_info() for '%s'" % pkg.cpv
                        ebuildpath = vardb.findname(pkg.cpv)
                        if not ebuildpath or not os.path.exists(ebuildpath):