Reorganize emerge --info <atom> display, and make sure that the "cpv was
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:01:26 +0000 (07:01 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:01:26 +0000 (07:01 -0000)
built with the following" line is shown for every package. (trunk r13304)

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

pym/_emerge/__init__.py

index c92078dc077343ce0a4d48ff6c9e1a7b8c660159..e3b7f2fb92f5be1c601b02918da00a985bc1e7cd 100644 (file)
@@ -13459,16 +13459,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,
@@ -13521,6 +13513,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):