# Checks Debian packages from Incoming
# Copyright (C) 2000, 2001, 2002, 2003 James Troup <james@nocrew.org>
-# $Id: jennifer,v 1.34 2003-05-02 13:54:52 troup Exp $
+# $Id: jennifer,v 1.35 2003-07-29 14:00:39 ajt 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
################################################################################
# Globals
-jennifer_version = "$Revision: 1.34 $";
+jennifer_version = "$Revision: 1.35 $";
Cnf = None;
Options = None;
reject("source version (%s) for %s doesn't match changes version %s." % (source_version, file, changes["version"]));
else:
# Check in the SQL database
- if not Katie.source_exists(source_package, source_version):
+ if not Katie.source_exists(source_package, source_version, changes["distribution"].keys()):
# Check in one of the other directories
source_epochless_version = utils.re_no_epoch.sub('', source_version);
dsc_filename = "%s_%s.dsc" % (source_package, source_epochless_version);
# Utility functions for katie
# Copyright (C) 2001, 2002, 2003 James Troup <james@nocrew.org>
-# $Id: katie.py,v 1.34 2003-07-15 17:29:19 troup Exp $
+# $Id: katie.py,v 1.35 2003-07-29 14:00:39 ajt 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
# (2) Bin-only NMU of an MU => 1.0-3.0.1
# (3) Bin-only NMU of a sourceful-NMU => 1.0-3.1.1
- def source_exists (self, package, source_version):
- q = self.projectB.query("SELECT s.version FROM source s WHERE s.source = '%s'" % (package));
-
- # Reduce the query results to a list of version numbers
- ql = map(lambda x: x[0], q.getresult());
-
- # Try (1)
- if ql.count(source_version):
- return 1;
-
- # Try (2)
- orig_source_version = re_bin_only_nmu_of_mu.sub('', source_version);
- if ql.count(orig_source_version):
- return 1;
-
- # Try (3)
- orig_source_version = re_bin_only_nmu_of_nmu.sub('', source_version);
- if ql.count(orig_source_version):
- return 1;
-
- # No source found...
- return 0;
+ def source_exists (self, package, source_version, suites = ["any"]):
+ okay = 1
+ for suite in suites:
+ if suites == "any":
+ que = "SELECT s.version FROM source s WHERE s.source = '%s'" % \
+ (package)
+ else:
+ suite_id = db_access.get_suite_id(suite);
+ que = "SELECT s.version FROM source s JOIN src_associations sa ON (s.id = sa.source) WHERE sa.suite = %d AND s.source = '%s'" % (suite_id, package)
+ q = self.projectB.query(que)
+
+ # Reduce the query results to a list of version numbers
+ ql = map(lambda x: x[0], q.getresult());
+
+ # Try (1)
+ if ql.count(source_version):
+ continue
+
+ # Try (2)
+ orig_source_version = re_bin_only_nmu_of_mu.sub('', source_version)
+ if ql.count(orig_source_version):
+ continue
+
+ # Try (3)
+ orig_source_version = re_bin_only_nmu_of_nmu.sub('', source_version)
+ if ql.count(orig_source_version):
+ continue
+
+ # No source found...
+ okay = 0
################################################################################
# Installs Debian packages
# Copyright (C) 2000, 2001, 2002, 2003 James Troup <james@nocrew.org>
-# $Id: kelly,v 1.9 2003-07-15 17:29:22 troup Exp $
+# $Id: kelly,v 1.10 2003-07-29 14:00:39 ajt 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
###############################################################################
# Globals
-kelly_version = "$Revision: 1.9 $";
+kelly_version = "$Revision: 1.10 $";
Cnf = None;
Options = None;
source_version = files[file]["source version"];
source_package = files[file]["source package"];
if not changes["architecture"].has_key("source") \
- and not Katie.source_exists(source_package, source_version):
+ and not Katie.source_exists(source_package, source_version, changes["distribution"].keys()):
reject("no source found for %s %s (%s)." % (source_package, source_version, file));
# Version and file overwrite checks
# Handles NEW and BYHAND packages
# Copyright (C) 2001, 2002, 2003 James Troup <james@nocrew.org>
-# $Id: lisa,v 1.23 2003-03-14 19:06:02 troup Exp $
+# $Id: lisa,v 1.24 2003-07-29 14:00:39 ajt 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
import db_access, fernanda, katie, logging, utils;
# Globals
-lisa_version = "$Revision: 1.23 $";
+lisa_version = "$Revision: 1.24 $";
Cnf = None;
Options = None;
source_version = files[file]["source version"];
source_package = files[file]["source package"];
if not Katie.pkg.changes["architecture"].has_key("source") \
- and not Katie.source_exists(source_package, source_version):
+ and not Katie.source_exists(source_package, source_version, changes["distribution"].keys()):
source_epochless_version = utils.re_no_epoch.sub('', source_version);
dsc_filename = "%s_%s.dsc" % (source_package, source_epochless_version);
if not os.path.exists(Cnf["Dir::Queue::Accepted"] + '/' + dsc_filename):