X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=katie;h=4f5ff94152a31f7bc2641857f11f78bd8435a927;hb=f04035f99394689d54904127333401727b9bb032;hp=27d909b7adf0028ce952ab56ea63deb21046dd6b;hpb=cd4e8043f530e38f975d877438bdd2707477487e;p=dak.git diff --git a/katie b/katie index 27d909b7..4f5ff941 100755 --- a/katie +++ b/katie @@ -2,7 +2,7 @@ # Installs Debian packages # Copyright (C) 2000, 2001, 2002 James Troup -# $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 @@ -39,7 +39,7 @@ import db_access, katie, logging, utils; ############################################################################### # Globals -katie_version = "$Revision: 1.80 $"; +katie_version = "$Revision: 1.83 $"; Cnf = None; Options = None; @@ -118,19 +118,20 @@ def check(): 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(): @@ -390,7 +391,7 @@ def install (): # 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"); @@ -401,7 +402,8 @@ def install (): # 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: