aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPriit Laes <plaes@plaes.org>2010-07-03 00:33:01 +0300
committerPriit Laes <plaes@plaes.org>2010-07-03 00:33:01 +0300
commitc494d75ea15634a86bb4a178891d8f66cbd74fc9 (patch)
tree0aee2735eb9920c909087099afbd8065cce8c617 /utils
parentRemove now unused --initial-sync option (diff)
downloadgsoc2010-grumpy-c494d75ea15634a86bb4a178891d8f66cbd74fc9.tar.gz
gsoc2010-grumpy-c494d75ea15634a86bb4a178891d8f66cbd74fc9.tar.bz2
gsoc2010-grumpy-c494d75ea15634a86bb4a178891d8f66cbd74fc9.zip
Clean up debug prints
Diffstat (limited to 'utils')
-rwxr-xr-xutils/grumpy_sync.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/utils/grumpy_sync.py b/utils/grumpy_sync.py
index 025e81d..036a513 100755
--- a/utils/grumpy_sync.py
+++ b/utils/grumpy_sync.py
@@ -142,16 +142,13 @@ def main(path):
old = [d.email for d in package.devs]
# Remove links to removed developers
for dev in [item for item in old if item not in new]:
- print "DEBUG: removing developer reference:", dev
package.devs.remove(Developer.query.filter_by(email=dev).one())
# Add/update new developers
for dev in new:
if dev in old:
continue
- print "DEBUG: adding developer reference:", dev
d = Developer.query.filter_by(email=dev).first()
if not d:
- print "DEBUG: adding new developer to database:", dev
d = Developer(dev)
package.devs.append(d)
@@ -163,29 +160,24 @@ def main(path):
new.append(herd.strip())
old = [h.name for h in package.herds]
for herd in [item for item in old if item not in new]:
- print "DEBUG: removing herd reference", herd
package.herds.remove(Herd.query.filter_by(name=herd).one())
for herd in new:
if herd in old:
continue
- print "DEBUG: adding herd reference:", herd
h = Herd.query.filter_by(name=herd).first()
if not h:
- print "DEBUG: adding new herd to database:", herd
h = Herd(herd)
package.herds.append(h)
# Handle ebuilds
new = [extract_version(pkg, file) for file in files]
old = [e.version for e in package.ebuilds]
- print "DEBUG: old: ", old
- print "DEBUG: new: ", new
- print "DEBUG: diff", [item for item in new if item not in old]
+ print "DEBUG: versions diff", [item for item in new if item not in old]
for ver in [item for item in old if item not in new]:
# Delete old ebuilds
ebuild = Ebuild.query.filter_by(cpv="%s/%s-%s" % (pkg, cat, ver)).first()
if not ebuild:
- print "Corruption detected: ebuild not found in database"
+ print "DEBUG: Corruption detected: ebuild not found in database"
raise RuntimeError
session.delete(ebuild)