'equery which' behavior fixed
authorgenone <genone@gentoo.org>
Fri, 9 Jan 2004 01:19:46 +0000 (01:19 -0000)
committergenone <genone@gentoo.org>
Fri, 9 Jan 2004 01:19:46 +0000 (01:19 -0000)
svn path=/; revision=54

trunk/src/equery/equery

index 468bc585fa52c908932431400c117e3f1e9db102..1d3d041f430cd93ad68b8b1e0487ac541d3da469 100755 (executable)
@@ -672,9 +672,9 @@ class CmdWhich(Command):
         (query, opts) = self.parseArgs(args)
 
         matches = gentoolkit.find_packages(query)
-
-        for pkg in matches:
-            print os.path.normpath(pkg.get_ebuild_path())
+        matches = gentoolkit.sort_package_list(matches)
+               
+        print os.path.normpath(matches[-1].get_ebuild_path())
                     
     def shortHelp(self):
         return turquoise("pkgspec") + " - print full path to ebuild for package " + turquoise("pkgspec")