# Installs Debian packages
# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
-# $Id: katie,v 1.80 2002-05-08 11:52:31 troup Exp $
+# $Id: katie,v 1.83 2002-05-19 19:55:29 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
###############################################################################
# Globals
-katie_version = "$Revision: 1.80 $";
+katie_version = "$Revision: 1.83 $";
Cnf = None;
Options = None;
and not Katie.source_exists(source_package, source_version):
reject("no source found for %s %s (%s)." % (source_package, source_version, file));
+ # Version and file overwrite checks
+ if not installing_to_stable:
+ if files[file]["type"] == "deb":
+ reject(Katie.check_binary_against_db(file));
+ elif files[file]["type"] == "dsc":
+ reject(Katie.check_source_against_db(file));
+ (reject_msg, is_in_incoming) = Katie.check_dsc_against_db(file);
+ reject(reject_msg);
+
+ # Check the package is still in the override tables
for suite in changes["distribution"].keys():
- # Check the package is still in the override tables
if not Katie.in_override_p(files[file]["package"], files[file]["component"], suite, files[file].get("dbtype",""), file):
reject("%s is NEW for %s." % (file, suite));
- if not installing_to_stable:
- if files[file]["type"] == "deb":
- reject(Katie.check_binaries_against_db(file, suite));
- elif files[file]["type"] == "dsc":
- reject(Katie.check_source_against_db(file));
- (reject_msg, is_in_incoming) = Katie.check_dsc_against_db(file);
- reject(reject_msg);
-
###############################################################################
def init():
# Undo the work done in katie.py(accept) to help auto-building
# from accepted.
- if Cnf.get("Dinstall::SpecialAcceptedAutoBuild") and \
+ if Cnf.FindB("Dinstall::SpecialAcceptedAutoBuild") and \
changes["distribution"].has_key("unstable"):
now_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(time.time()));
projectB.query("BEGIN WORK");
# Update the symlink to point to the new location in the pool
pool_location = utils.poolify (changes["source"], files[file]["component"]);
src = os.path.join(Cnf["Dir::Pool"], pool_location, os.path.basename(file));
- os.unlink(dest);
+ if os.path.islink(dest):
+ os.unlink(dest);
os.symlink(src, dest);
# Update last_used on any non-upload .orig.tar.gz symlink
if orig_tar_id: