Make --info repo display brief, unless --verbose.
authorZac Medico <zmedico@gentoo.org>
Wed, 6 Oct 2010 02:48:44 +0000 (19:48 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 6 Oct 2010 02:48:44 +0000 (19:48 -0700)
pym/_emerge/actions.py

index a8fd39b150441118d15f6f2c0b9ad01e1c5f2c2a..5fd7a9d114adbb5870eea758570faff9a1eab1df 100644 (file)
@@ -1357,9 +1357,13 @@ def action_info(settings, trees, myopts, myfiles):
        libtool_vers = ",".join(trees["/"]["vartree"].dbapi.match("sys-devel/libtool"))
 
        repos = portdb.settings.repositories
-       writemsg_stdout("Repositories:\n\n")
-       for repo in repos:
-               writemsg_stdout(repo.info_string())
+       if "--verbose" in myopts:
+               writemsg_stdout("Repositories:\n\n")
+               for repo in repos:
+                       writemsg_stdout(repo.info_string())
+       else:
+               writemsg_stdout("Repositories: %s\n" % \
+                       " ".join(repo.name for repo in repos))
 
        if "--verbose" in myopts:
                myvars = list(settings)