[csw-devel] SF.net SVN: gar:[13071] csw/mgar/gar/v2/lib/python/pkgdb.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Jan 23 14:14:21 CET 2011


Revision: 13071
          http://gar.svn.sourceforge.net/gar/?rev=13071&view=rev
Author:   wahwah
Date:     2011-01-23 13:14:21 +0000 (Sun, 23 Jan 2011)

Log Message:
-----------
pkgdb: Catalog generation bugfix

When generating a catalog, read the same catalog from the database than the
one to be generated.  Previously, the 'current' catalog was read from the db
and written to 'unstable'.

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	2011-01-23 11:45:08 UTC (rev 13070)
+++ csw/mgar/gar/v2/lib/python/pkgdb.py	2011-01-23 13:14:21 UTC (rev 13071)
@@ -539,6 +539,8 @@
       print obj.basename, obj.md5_sum
   elif command == 'gen-cat':
     catrel = 'unstable'
+    if options.catrel != catrel:
+      logging.warn("Generating the %s catalog.", catrel)
     if len(args) != 2:
       raise UsageError("Wrong number of arguments, see usage.")
     allpkgs_dir, target_dir = args
@@ -560,7 +562,7 @@
     for osrel in ("SunOS5.%s" % x for x in (8, 9, 10)):
       for arch in archs:
         sqo_osrel, sqo_arch, sqo_catrel = GetSqoTriad(
-            osrel, arch, options.catrel)
+            osrel, arch, catrel)
         pkgs = list(GetCatPackagesResult(sqo_osrel, sqo_arch, sqo_catrel))
         logging.debug("The catalog contains %s packages" % len(pkgs))
         # For now, only making hardlinks to packages from allpkgs


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