[csw-devel] SF.net SVN: gar:[12112] csw/mgar/gar/v2/lib/python/pkgdb.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Wed Dec 29 01:10:16 CET 2010
Revision: 12112
http://gar.svn.sourceforge.net/gar/?rev=12112&view=rev
Author: wahwah
Date: 2010-12-29 00:10:15 +0000 (Wed, 29 Dec 2010)
Log Message:
-----------
pkgdb: Add 'show filename' support
Printing all packages in one line, space separated.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/pkgdb.py
Modified: csw/mgar/gar/v2/lib/python/pkgdb.py
===================================================================
--- csw/mgar/gar/v2/lib/python/pkgdb.py 2010-12-29 00:09:44 UTC (rev 12111)
+++ csw/mgar/gar/v2/lib/python/pkgdb.py 2010-12-29 00:10:15 UTC (rev 12112)
@@ -48,6 +48,7 @@
%prog gen-html <md5sum> [ ... ]
%prog pkg search <catalogname>
%prog show basename [options] <filename>
+ %prog show filename [options] <filename>
%prog show files <md5-sum>
@@ -513,6 +514,12 @@
arg, options.osrel, options.arch, options.catrel)
for file_path in pkgs_by_path:
print os.path.join(file_path, arg), ", ".join(pkgs_by_path[file_path])
+ elif (command, subcommand) == ('show', 'filename'):
+ db_catalog = checkpkg_lib.Catalog()
+ for arg in args:
+ pkgs = db_catalog.GetPkgByPath(
+ arg, options.osrel, options.arch, options.catrel)
+ print " ".join(pkgs)
else:
raise UsageError("Command unrecognized: %s" % command)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list