X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Foverride.py;h=f98f03c5ae21a2f761fa1bd9550949e7e90a4b97;hb=d80d1f9473ed63a08404a23c04a9d8eabedc76a6;hp=89bac5b90f8a665afcf058e6220dc37a3a23904b;hpb=774a27caff1cc21340ee1b08528512e96a0eed5b;p=dak.git diff --git a/dak/override.py b/dak/override.py index 89bac5b9..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"]: @@ -247,10 +243,11 @@ def main (): Subst["__BCC__"] = "Bcc: " + ", ".join(bcc) else: Subst["__BCC__"] = "X-Filler: 42" - Subst["__CC__"] = "X-DAK: dak override\nX-Katie: alicia $Revision: 1.6$" + Subst["__CC__"] = "X-DAK: dak override\nX-Katie: alicia" Subst["__ADMIN_ADDRESS__"] = Cnf["Dinstall::MyAdminAddress"] Subst["__DISTRO__"] = Cnf["Dinstall::MyDistribution"] Subst["__WHOAMI__"] = utils.whoami() + Subst["__SOURCE__"] = package summary = "Concerning package %s...\n" % (package) summary += "Operating on the %s suite\n" % (suite)