[csw-devel] SF.net SVN: gar:[20530] csw/mgar/gar/v2/lib/python
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Fri Mar 29 17:10:37 CET 2013
Revision: 20530
http://gar.svn.sourceforge.net/gar/?rev=20530&view=rev
Author: wahwah
Date: 2013-03-29 16:10:36 +0000 (Fri, 29 Mar 2013)
Log Message:
-----------
pkgdb: Variou cleanup
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/catalog_notifier_test.py
csw/mgar/gar/v2/lib/python/checkpkg2.py
csw/mgar/gar/v2/lib/python/checkpkg_lib.py
csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
csw/mgar/gar/v2/lib/python/find_missing_bins.py
csw/mgar/gar/v2/lib/python/makeStdLibDb.py
csw/mgar/gar/v2/lib/python/opencsw.py
csw/mgar/gar/v2/lib/python/package.py
csw/mgar/gar/v2/lib/python/package_stats_test.py
csw/mgar/gar/v2/lib/python/patch_package.py
csw/mgar/gar/v2/lib/python/pkgdb.py
Modified: csw/mgar/gar/v2/lib/python/catalog_notifier_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/catalog_notifier_test.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/catalog_notifier_test.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -11,7 +11,7 @@
class NotificationFormatterTest(mox.MoxTestBase):
-
+
def disabled_testOne(self):
"""This tested too much."""
f = catalog_notifier.NotificationFormatter()
Modified: csw/mgar/gar/v2/lib/python/checkpkg2.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg2.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/checkpkg2.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -79,6 +79,7 @@
help="Enable profiling (a developer option).")
options, args = parser.parse_args()
assert len(args), "The list of files or md5 sums must be not empty."
+
logging_level = logging.INFO
if options.quiet:
logging_level = logging.WARNING
@@ -92,7 +93,6 @@
dm = database.DatabaseManager()
dm.AutoManage()
-
err_msg_list = []
if not options.osrel_commas:
err_msg_list.append("Please specify --os-releases.")
Modified: csw/mgar/gar/v2/lib/python/checkpkg_lib.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg_lib.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/checkpkg_lib.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -835,7 +835,7 @@
return sliced
-class CatalogMixin(SqlobjectHelperMixin):
+class Catalog(SqlobjectHelperMixin):
"""Responsible for functionality related to catalog operations.
These include:
@@ -1086,7 +1086,3 @@
sqo_srv4_in_cat.destroySelf()
except sqlobject.main.SQLObjectNotFound, e:
logging.warning(e)
-
-
-class Catalog(CatalogMixin):
- pass
Modified: csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/csw_upload_pkg.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -364,7 +364,7 @@
def _CheckpkgSets(self, planned_modifications):
"""Groups packages according to catalogs.
-
+
Used to determine groups of packages to check together, against
a specific catalog.
Modified: csw/mgar/gar/v2/lib/python/find_missing_bins.py
===================================================================
--- csw/mgar/gar/v2/lib/python/find_missing_bins.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/find_missing_bins.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -63,7 +63,7 @@
if not pkg:
logging.warning("MakeRevIndex: No package for %r", md5)
continue
- try:
+ try:
pkg_name = pkg["basic_stats"]["pkgname"]
for p in pkg['binaries_dump_info']:
for b in p['needed sonames']:
@@ -77,7 +77,7 @@
for pm in pkg['pkgmap']:
if pm['type'] == 's': # symbolic link
cl.append(pm['line'].split(' ')[3].split('=')[0]) # take the linkname
-
+
except KeyError:
logging.warning("MakeRevIndex: no pkg structure: ")
# logging.warning(pkg)
@@ -155,7 +155,7 @@
break
if found: break
if not found:
- # second search is there a link with this name
+ # second search is there a link with this name
for lpkg in links:
for l in links[lpkg]:
# if lib in the package
@@ -170,13 +170,13 @@
found = True
# logging.debug ("\nfound %s" % nb)
# at last search the lib in earlier os releases
- if not found:
+ if not found:
fl.write("%s:%s:%s:%s\n" % (nb,pkg,arch,osrel) )
print "\nNOT FOUND: %s, needed in pkg %s %s %s" % (nb,pkg,arch,osrel)
sys.stdout.write("\rscanPackage %4d %s" % (i,pkg))
sys.stdout.flush()
fl.close()
-
+
def main():
parser = optparse.OptionParser()
parser.add_option("--debug", dest="debug", action="store_true")
Modified: csw/mgar/gar/v2/lib/python/makeStdLibDb.py
===================================================================
--- csw/mgar/gar/v2/lib/python/makeStdLibDb.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/makeStdLibDb.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -1,6 +1,6 @@
#!/bin/env python
-"""Builds a list of standard libs and stores this in stdlib.json
+"""Builds a list of standard libs and stores this in stdlib.json
this list/file is needed by find_missing_bins.py
"""
Modified: csw/mgar/gar/v2/lib/python/opencsw.py
===================================================================
--- csw/mgar/gar/v2/lib/python/opencsw.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/opencsw.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -285,7 +285,7 @@
if line.startswith("#"): continue
if "BEGIN PGP SIGNED MESSAGE" in line: continue
if line.startswith("Hash:"): continue
- if len(line.strip()) <= 0: continue
+ if len(line.strip()) <= 0: continue
if "BEGIN PGP SIGNATURE" in line: break
fields = re.split(r"\s+", line)
try:
Modified: csw/mgar/gar/v2/lib/python/package.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/package.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -274,7 +274,7 @@
basedir = pkginfo[basedir_id]
else:
basedir = ""
- # The convention in checkpkg is to not include the leading slash in paths.
+ # The convention in checkpkg is to not include the leading slash in paths.
basedir = basedir.lstrip("/")
return basedir
Modified: csw/mgar/gar/v2/lib/python/package_stats_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_stats_test.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/package_stats_test.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -156,7 +156,7 @@
def testImportPkg(self):
"""Registers the package in the database."""
package_stats.PackageStats.ImportPkg(neon_stats[0])
- # basename=u'libneon.so.26.0.4' path=u'/opt/csw/lib'
+ # basename=u'libneon.so.26.0.4' path=u'/opt/csw/lib'
res = m.CswFile.select(
sqlobject.AND(
m.CswFile.q.basename==u'libneon.so.26.0.4',
Modified: csw/mgar/gar/v2/lib/python/patch_package.py
===================================================================
--- csw/mgar/gar/v2/lib/python/patch_package.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/patch_package.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -1,7 +1,7 @@
#!/usr/bin/env python2.6
#
# A utility to patch an existing package.
-#
+#
# Usage:
# patchpkg --srv4-file /tmp/foo-1.0-sparc-CSW.pkg.gz --export /work/dir
# cd /work/dir/CSWfoo
Modified: csw/mgar/gar/v2/lib/python/pkgdb.py
===================================================================
--- csw/mgar/gar/v2/lib/python/pkgdb.py 2013-03-28 20:47:04 UTC (rev 20529)
+++ csw/mgar/gar/v2/lib/python/pkgdb.py 2013-03-29 16:10:36 UTC (rev 20530)
@@ -150,7 +150,7 @@
t = Template(tmpl_str, searchList=[{
"pkgstats": pkgstats,
"hachoir_machines": package_checks.HACHOIR_MACHINES,
- }])
+ }])
return unicode(t)
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