From: Ansgar Burchardt Date: Mon, 8 Apr 2013 21:20:44 +0000 (+0200) Subject: Merge remote-tracking branch 'dktrkranz/fixes' X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=dfcf4071605b938bc472062973545e0abe392bfc;hp=d7ed6e68e1b566f0462b742013884174898b57b7;p=dak.git Merge remote-tracking branch 'dktrkranz/fixes' --- diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index a626c93a..58f397b4 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -207,7 +207,6 @@ GO=( stage $GO lockfile "$LOCK_ACCEPTED" -lockfile "$LOCK_NEW" trap remove_all_locks EXIT TERM HUP INT QUIT GO=( diff --git a/config/debian/cron.unchecked b/config/debian/cron.unchecked index fb5c454a..7db5c284 100755 --- a/config/debian/cron.unchecked +++ b/config/debian/cron.unchecked @@ -32,7 +32,6 @@ export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars LOCKDAILY="" LOCKFILE="$lockdir/unchecked.lock" -LOCK_NEW="$lockdir/processnew.lock" NOTICE="$lockdir/daily.lock" LOCK_BUILDD="$lockdir/buildd.lock" diff --git a/config/debian/dak.conf b/config/debian/dak.conf index 82084580..85ff4a39 100644 --- a/config/debian/dak.conf +++ b/config/debian/dak.conf @@ -117,7 +117,6 @@ Clean-Suites Process-New { - DinstallLockFile "/srv/ftp-master.debian.org/lock/processnew.lock"; LockDir "/srv/ftp-master.debian.org/lock/new/"; }; diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 1ced7602..8119387c 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -11,7 +11,7 @@ function remove_daily_lock() { # Remove all locks function remove_all_locks() { - rm -f $LOCK_DAILY $LOCK_ACCEPTED $LOCK_NEW + rm -f $LOCK_DAILY $LOCK_ACCEPTED } # If we error out this one is called, *FOLLOWED* by cleanup above diff --git a/config/debian/dinstall.variables b/config/debian/dinstall.variables index 47222a5d..81a651d8 100644 --- a/config/debian/dinstall.variables +++ b/config/debian/dinstall.variables @@ -28,9 +28,6 @@ LOCK_DAILY="$lockdir/daily.lock" # Lock cron.unchecked from doing work LOCK_ACCEPTED="$lockdir/unchecked.lock" -# Lock process-new from doing work -LOCK_NEW="$lockdir/processnew.lock" - # This file is simply used to indicate to britney whether or not # the Packages file updates completed sucessfully. It's not a lock # from our point of view diff --git a/dak/examine_package.py b/dak/examine_package.py index 7c005783..56bb477e 100755 --- a/dak/examine_package.py +++ b/dak/examine_package.py @@ -232,6 +232,7 @@ def split_depends (d_str) : def read_control (filename): recommends = [] + predepends = [] depends = [] section = '' maintainer = '' @@ -250,6 +251,10 @@ def read_control (filename): control_keys = control.keys() + if "Pre-Depends" in control: + predepends_str = control["Pre-Depends"] + predepends = split_depends(predepends_str) + if "Depends" in control: depends_str = control["Depends"] # create list of dependancy lists @@ -286,7 +291,7 @@ def read_control (filename): else: maintainer = escape_if_needed(maintainer) - return (control, control_keys, section, depends, recommends, arch, maintainer) + return (control, control_keys, section, predepends, depends, recommends, arch, maintainer) def read_changes_or_dsc (suite, filename, session = None): dsc = {} @@ -415,7 +420,7 @@ def output_package_relations (): return foldable_output("Package relations", "relations", to_print) def output_deb_info(suite, filename, packagename, session = None): - (control, control_keys, section, depends, recommends, arch, maintainer) = read_control(filename) + (control, control_keys, section, predepends, depends, recommends, arch, maintainer) = read_control(filename) if control == '': return formatted_text("no control info") @@ -423,7 +428,10 @@ def output_deb_info(suite, filename, packagename, session = None): if not package_relations.has_key(packagename): package_relations[packagename] = {} for key in control_keys : - if key == 'Depends': + if key == 'Pre-Depends': + field_value = create_depends_string(suite, predepends, session) + package_relations[packagename][key] = field_value + elif key == 'Depends': field_value = create_depends_string(suite, depends, session) package_relations[packagename][key] = field_value elif key == 'Recommends': diff --git a/dak/process_new.py b/dak/process_new.py index 7352b91d..e3dc5de1 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -527,17 +527,12 @@ def do_new(upload, upload_copy, handler, session): continue if answer == 'A' and not Options["Trainee"]: - try: - check_daily_lock() - add_overrides(missing, upload.target_suite, session) - if Config().find_b("Dinstall::BXANotify"): - do_bxa_notification(missing, upload, session) - handler.accept() - done = True - Logger.log(["NEW ACCEPT", upload.changes.changesname]) - except CantGetLockError: - print "Hello? Operator! Give me the number for 911!" - print "Dinstall in the locked area, cant process packages, come back later" + add_overrides(missing, upload.target_suite, session) + if Config().find_b("Dinstall::BXANotify"): + do_bxa_notification(missing, upload, session) + handler.accept() + done = True + Logger.log(["NEW ACCEPT", upload.changes.changesname]) elif answer == 'C': check_pkg(upload, upload_copy, session) elif answer == 'E' and not Options["Trainee"]: @@ -625,24 +620,6 @@ ENVIRONMENT VARIABLES ################################################################################ -def check_daily_lock(): - """ - Raises CantGetLockError if the dinstall daily.lock exists. - """ - - cnf = Config() - try: - lockfile = cnf.get("Process-New::DinstallLockFile", - os.path.join(cnf['Dir::Lock'], 'processnew.lock')) - - os.open(lockfile, - os.O_RDONLY | os.O_CREAT | os.O_EXCL) - except OSError as e: - if e.errno == errno.EEXIST or e.errno == errno.EACCES: - raise CantGetLockError - - os.unlink(lockfile) - @contextlib.contextmanager def lock_package(package): """