From: Joerg Jaspert Date: Sun, 28 Dec 2008 19:13:37 +0000 (+0100) Subject: Merge commit 'djpig/djpig' into merge X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=893869d15f5f10967b4cb6f69a580231d23b3253;hp=d6c675a02c32f25a25748834c8e80a3577ec9f25;p=dak.git Merge commit 'djpig/djpig' into merge * commit 'djpig/djpig': override: Handle source-only packages better Signed-off-by: Joerg Jaspert --- diff --git a/ChangeLog b/ChangeLog index 06516ccd..03a60f63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-12-28 Frank Lichtenheld + + * dak/override.py (main): Handle source-only packages better + 2008-12-23 Michael Casadevall * dak/queue_report.py - Added 822 output format diff --git a/dak/override.py b/dak/override.py index ca3cb41d..f98f03c5 100755 --- a/dak/override.py +++ b/dak/override.py @@ -134,6 +134,7 @@ def main (): oldpriority = r[0][0] else: oldsourcesection = r[0][1] + oldpriority = 'source' if not oldpriority and not oldsourcesection: utils.fubar("Unable to find package %s" % (package)) @@ -144,13 +145,8 @@ def main (): oldsection = oldsourcesection if not arguments: - if oldpriority: - print "%s is in section '%s' at priority '%s'" % ( - package,oldsection,oldpriority) - elif oldsourcesection: - # no use printing this line if also binary - print "%s is in section '%s'" % ( - package,oldsourcesection) + print "%s is in section '%s' at priority '%s'" % ( + package,oldsection,oldpriority) sys.exit(0) # At this point, we have a new section and priority... check they're valid... @@ -179,8 +175,8 @@ def main (): print "I: Doing nothing" sys.exit(0) - if newpriority and not oldpriority: - utils.fubar("Trying to set priority of a source-only package") + if oldpriority == 'source' and newpriority != 'source': + utils.fubar("Trying to change priority of a source-only package") # If we're in no-action mode if Options["No-Action"]: