summaryrefslogtreecommitdiff
path: root/scripts/reporead.py
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2008-04-16 19:55:47 -0700
committereliott <eliott@cactuswax.net>2008-04-16 19:55:47 -0700
commit512ad192f705ed7c0fe97ea4d7e8e6ce9029ee53 (patch)
treeadeb74f3b724f585716a99fb6b86f1c9cbf95747 /scripts/reporead.py
parentb81e11f0602e90f44989dc95f2cd09838df87e11 (diff)
Added some more debug logging.
Diffstat (limited to 'scripts/reporead.py')
-rwxr-xr-xscripts/reporead.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/reporead.py b/scripts/reporead.py
index 958278b3..26a550f2 100755
--- a/scripts/reporead.py
+++ b/scripts/reporead.py
@@ -159,10 +159,12 @@ def db_update(archname, pkgs):
# go go set theory!
# thank you python for having a set class <3
+ logger.debug("Creating sets")
dbset = set([pkg.pkgname for pkg in dbpkgs])
syncset = set([pkg.name for pkg in pkgs])
# packages in syncdb and not in database (add to database)
+ logger.debug("Set theory: Packages in syncdb not in database")
in_sync_not_db = syncset - dbset
for p in [x for x in pkgs if x.name in in_sync_not_db]:
logger.debug("Adding package %s", p.name)
@@ -190,6 +192,7 @@ def db_update(archname, pkgs):
logger.debug('Added %s as dep for pkg %s' % (dpname,p.name))
# packages in database and not in syncdb (remove from database)
+ logger.debug("Set theory: Packages in database not in syncdb")
in_db_not_sync = dbset - syncset
for p in in_db_not_sync:
logger.info("Removing package %s from database", p)
@@ -197,8 +200,10 @@ def db_update(archname, pkgs):
pkgname=p, arch=architecture, repo=repository).delete()
# packages in both database and in syncdb (update in database)
+ logger.debug("Set theory: Packages in database and syncdb")
pkg_in_both = syncset & dbset
for p in [x for x in pkgs if x.name in pkg_in_both]:
+ logger.debug("Looking for package updates")
dbp = dbpkgs.get(pkgname=p.name)
if ''.join((p.ver,p.rel)) == ''.join((dbp.pkgver,dbp.pkgrel)):
continue
@@ -331,7 +336,7 @@ def main(argv=None):
for package in packages:
if package.arch not in [x.name for x in available_arches]:
- logger.warning("Package %s has missing or invalid arch" % (package.name))
+ logger.warning("Package %s arch = %s" % (package.name,package.arch))
package.arch = primary_arch
packages_arches[package.arch].append(package)