From 4df20c3923c3b768e31030a436b77829f56776ac Mon Sep 17 00:00:00 2001 From: James Troup Date: Tue, 19 Dec 2000 21:06:20 +0000 Subject: [PATCH] fix rejection logic error --- apt.conf-non-US | 12 +++++++++++- katie | 10 ++++++---- katie.conf | 2 +- katie.conf-non-US | 12 ++++++------ rhona | 26 +++++++++++++++++++++++++- 5 files changed, 49 insertions(+), 13 deletions(-) diff --git a/apt.conf-non-US b/apt.conf-non-US index ef7f1190..4f08607d 100644 --- a/apt.conf-non-US +++ b/apt.conf-non-US @@ -31,6 +31,16 @@ tree "dists/stable/non-US" External-Links false; }; +tree "dists/testing" +{ + FileList "/org/non-us.debian.org/database/dists/testing_non-us/$(SECTION)_binary-$(ARCH).list"; + SourceFileList "/org/non-us.debian.org/database/dists/testing_non-us/$(SECTION)_source.list"; + Sections "main contrib non-free"; + Architectures "alpha arm i386 m68k powerpc sparc source"; + BinOverride "override.woody.$(SECTION)"; + SrcOverride "override.woody.$(SECTION).src"; +}; + tree "dists/unstable/non-US" { FileList "/org/non-us.debian.org/database/dists/unstable_non-us/$(SECTION)_binary-$(ARCH).list"; @@ -48,7 +58,7 @@ bindirectory "dists/proposed-updates" SourceFileList "/org/non-us.debian.org/database/proposed-updates_-_source.list"; Packages "dists/proposed-updates/Packages"; Sources "dists/proposed-updates/Sources"; - Contents ""; + Contents " "; BinOverride "override.potato.all3"; BinCacheDB "packages-proposed-updates.db"; diff --git a/katie b/katie index 98083dea..010d5611 100755 --- a/katie +++ b/katie @@ -2,7 +2,7 @@ # Installs Debian packaes # Copyright (C) 2000 James Troup -# $Id: katie,v 1.13 2000-12-19 17:23:03 troup Exp $ +# $Id: katie,v 1.14 2000-12-19 21:06:20 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 @@ -851,13 +851,15 @@ def reject (changes_filename, manual_reject_mail_filename): # Move the .changes files and it's contents into REJECT/ (if we can; errors are ignored) try: utils.move (changes_filename, "%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], base_changes_filename)); - except cant_overwrite_exc: + except utils.cant_overwrite_exc: + sys.stderr.write("W: couldn't overwrite existing file '%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], base_changes_filename)); pass; for file in files.keys(): - if os.access(file,os.R_OK) == 0: + if os.path.exists(file): try: utils.move (file, "%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], file)); - except cant_overwrite_exc: + except utils.cant_overwrite_exc: + sys.stderr.write("W: couldn't overwrite existing file '%s/REJECT/%s" % (Cnf["Dir::IncomingDir"], file)); pass; # If this is not a manual rejection generate the .reason file and rejection mail message diff --git a/katie.conf b/katie.conf index 047b762d..556ff745 100644 --- a/katie.conf +++ b/katie.conf @@ -147,7 +147,7 @@ Suite "sparc" ""; }; Announce "debian-changes@lists.debian.org"; - Version "2.2r0"; + Version "2.2r2"; Origin "Debian"; Description "Debian 2.2r2 Released 5th December 2000"; CodeName "potato"; diff --git a/katie.conf-non-US b/katie.conf-non-US index 31195a74..1584b96b 100644 --- a/katie.conf-non-US +++ b/katie.conf-non-US @@ -95,8 +95,8 @@ Rhona // How long (in seconds) dead packages are left before being killed StayOfExecution 0; // 0 days - MorgueSubDir "rhona"; - OverrideFilename "override.source-only"; + MorgueSubDir "rhona"; + OverrideFilename "override.source-only"; }; Suite @@ -147,9 +147,9 @@ Suite "sparc" ""; }; Announce "debian-changes@lists.debian.org"; - Version "2.2r0"; + Version "2.2r2"; Origin "Debian"; - Description "Debian 2.2r1 Released 12th November 2000"; + Description "Debian 2.2r2 Released 5th December 2000"; CodeName "potato"; OverrideCodeName "potato"; Priority "1"; @@ -172,9 +172,9 @@ Suite }; Announce "debian-changes@lists.debian.org"; CopyChanges "dists/proposed-updates/"; - Version "2.2r2"; + Version "2.2r3"; Origin "Debian"; - Description "Proposed Updates for Debian 2.2r2 - Not Released"; + Description "Proposed Updates for Debian 2.2r3 - Not Released"; CodeName "proposed-updates"; OverrideCodeName "potato"; Priority "2"; diff --git a/rhona b/rhona index ba99cf4f..8446c019 100755 --- a/rhona +++ b/rhona @@ -2,7 +2,7 @@ # rhona, cleans up unassociated binary and source packages # Copyright (C) 2000 James Troup -# $Id: rhona,v 1.4 2000-12-18 07:11:25 troup Exp $ +# $Id: rhona,v 1.5 2000-12-19 21:06:20 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 @@ -42,6 +42,16 @@ overrides = {}; ################################################################################################### +def usage (exit_code): + print """Usage: rhona [OPTION]... [CHANGES]... + -D, --debug=VALUE debug + -n, --no-action don't do anything + -v, --verbose be verbose + -V, --version display version number and exit""" + sys.exit(exit_code) + +################################################################################################### + # See if a given package is in the override file. Caches and only loads override files on demand. def in_override_p (package): @@ -315,6 +325,20 @@ def main(): Cnf = apt_pkg.newConfiguration(); apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); + Arguments = [('D',"debug","Rhona::Options::Debug", "IntVal"), + ('h',"help","Rhona::Options::Help"), + ('n',"no-action","Rhona::Options::No-Action"), + ('v',"verbose","Rhona::Options::Verbose"), + ('V',"version","Rhona::Options::Version")]; + + apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + if Cnf["Rhona::Options::Help"]: + usage(0); + + if Cnf["Rhona::Options::Version"]: + print "rhona version 0.0000000000"; + usage(0); + delete_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(time.time())); check_binaries(); -- 2.39.2