Invert portageq list_preserved_libs returncode meaning.
authorZac Medico <zmedico@gentoo.org>
Wed, 29 Sep 2010 15:57:50 +0000 (08:57 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 1 Oct 2010 00:53:13 +0000 (17:53 -0700)
Thanks to Jeremy Olexa <darkside@g.o> for the suggestion.

bin/portageq

index 27a2e250eebe59ca51dfd722582842876f2609d9..4c9b9c13e924720fa3d905cb9daf2a949b1e3db5 100755 (executable)
@@ -550,21 +550,21 @@ def get_repo_path(argv):
 def list_preserved_libs(argv):
        """<root>
        Print a list of libraries preserved during a package update in the form
-       package: path. Returns 0 if no preserved libraries could be found, 
-       1 otherwise.
+       package: path. Returns 1 if no preserved libraries could be found,
+       0 otherwise.
        """
 
        if len(argv) != 1:
                print("ERROR: wrong number of arguments")
                sys.exit(2)
        mylibs = portage.db[argv[0]]["vartree"].dbapi._plib_registry.getPreservedLibs()
-       rValue = 0
+       rValue = 1
        msg = []
        for cpv in sorted(mylibs):
                msg.append(cpv)
                for path in mylibs[cpv]:
                        msg.append(' ' + path)
-                       rValue = 1
+                       rValue = 0
                msg.append('\n')
        writemsg_stdout(''.join(msg), noiselevel=-1)
        return rValue