From b00863532c2990bab5dee83e1c5d0fa7b5439e47 Mon Sep 17 00:00:00 2001 From: James Troup Date: Sat, 28 Jul 2001 18:07:58 +0000 Subject: [PATCH] source version >> checking --- katie | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/katie b/katie index 86cf04a3..cf268043 100755 --- a/katie +++ b/katie @@ -2,7 +2,7 @@ # Installs Debian packaes # Copyright (C) 2000, 2001 James Troup -# $Id: katie,v 1.55 2001-07-13 19:47:31 troup Exp $ +# $Id: katie,v 1.56 2001-07-28 18:07:58 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -587,6 +587,17 @@ def check_dsc (): if epochless_dsc_version != files[file]["version"]: reject_message = reject_message + "Rejected: version ('%s') in .dsc does not match version ('%s') in .changes\n" % (epochless_dsc_version, changes_version); + # Ensure source is newer than existing source in target suites + package = dsc.get("source"); + new_version = dsc.get("version"); + for suite in changes["distribution"].keys(): + q = projectB.query("SELECT s.version FROM source s, src_associations sa, suite su WHERE s.source = '%s' AND su.suite_name = '%s' AND sa.source = s.id AND sa.suite = su.id" + % (package, suite)); + ql = map(lambda x: x[0], q.getresult()); + for old_version in ql: + if apt_pkg.VersionCompare(new_version, old_version) != 1: + reject_message = reject_message + "Rejected: %s Old version `%s' >= new version `%s'.\n" % (file, old_version, new_version) + # Try and find all files mentioned in the .dsc. This has # to work harder to cope with the multiple possible # locations of an .orig.tar.gz. @@ -1377,7 +1388,7 @@ def main(): Subst = {} Subst["__ADMIN_ADDRESS__"] = Cnf["Dinstall::MyAdminAddress"]; Subst["__BUG_SERVER__"] = Cnf["Dinstall::BugServer"]; - bcc = "X-Katie: $Revision: 1.55 $" + bcc = "X-Katie: $Revision: 1.56 $" if Cnf.has_key("Dinstall::Bcc"): Subst["__BCC__"] = bcc + "\nBcc: %s" % (Cnf["Dinstall::Bcc"]); else: -- 2.39.5