From: Mark Hymers Date: Thu, 28 Jul 2011 06:20:45 +0000 (+0100) Subject: Holding isn't a queue either, it's a tmpdir X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db2d829cce8f0dd8aadb6af5e6258ab4fced871d;p=dak Holding isn't a queue either, it's a tmpdir Signed-off-by: Mark Hymers --- diff --git a/config/backports/dak.conf b/config/backports/dak.conf index 1f09c927..0bfa284f 100644 --- a/config/backports/dak.conf +++ b/config/backports/dak.conf @@ -211,12 +211,12 @@ Dir UrgencyLog "/srv/backports-master.debian.org/testing/urgencies/"; TempPath "/srv/backports-master.debian.org/tmp"; BTSVersionTrack "/srv/backports-master.debian.org/queue/bts_version_track/"; + Holding "/srv/backports-master.debian.org/queue/holding/"; Queue { Byhand "/srv/backports-master.debian.org/queue/byhand/"; Done "/srv/backports-master.debian.org/queue/done/"; - Holding "/srv/backports-master.debian.org/queue/holding/"; New "/srv/backports-master.debian.org/queue/new/"; Reject "/srv/backports-master.debian.org/queue/reject/"; Unchecked "/srv/backports-master.debian.org/queue/unchecked/"; diff --git a/config/debian-security/dak.conf b/config/debian-security/dak.conf index 3d1eba53..ec3501ed 100644 --- a/config/debian-security/dak.conf +++ b/config/debian-security/dak.conf @@ -223,11 +223,12 @@ Dir Override "/srv/security-master.debian.org/scripts/override/"; Upload "/srv/queued/ftpmaster/"; TempPath "/srv/security-master.debian.org/tmp"; + Holding "/srv/security-master.debian.org/queue/holding/"; + Queue { Byhand "/srv/security-master.debian.org/queue/byhand/"; Done "/srv/security-master.debian.org/queue/done/"; - Holding "/srv/security-master.debian.org/queue/holding/"; New "/srv/security-master.debian.org/queue/new/"; Reject "/srv/security-master.debian.org/queue/reject/"; Unchecked "/srv/security-master.debian.org/queue/unchecked/"; diff --git a/config/debian/dak.conf b/config/debian/dak.conf index 10f3e90f..d74d5641 100644 --- a/config/debian/dak.conf +++ b/config/debian/dak.conf @@ -325,6 +325,7 @@ Dir UrgencyLog "/srv/release.debian.org/britney/input/urgencies/"; TempPath "/srv/ftp-master.debian.org/tmp/"; BTSVersionTrack "/srv/ftp-master.debian.org/queue/bts_version_track/"; + Holding "/srv/ftp-master.debian.org/queue/holding/"; Queue { @@ -333,7 +334,6 @@ Dir OldProposedUpdates "/srv/ftp-master.debian.org/queue/o-p-u-new/"; ProposedUpdates "/srv/ftp-master.debian.org/queue/p-u-new/"; Done "/srv/ftp-master.debian.org/queue/done/"; - Holding "/srv/ftp-master.debian.org/queue/holding/"; New "/srv/ftp-master.debian.org/queue/new/"; Reject "/srv/ftp-master.debian.org/queue/reject/"; Unchecked "/srv/ftp-master.debian.org/queue/unchecked/"; diff --git a/dak/process_upload.py b/dak/process_upload.py index 84186c57..bf74baa6 100755 --- a/dak/process_upload.py +++ b/dak/process_upload.py @@ -364,7 +364,7 @@ def process_it(changes_file, session): # If this is the Real Thing(tm), copy things into a private # holding directory first to avoid replacable file races. if not Options["No-Action"]: - os.chdir(cnf["Dir::Queue::Holding"]) + holding.chdir_to_holding() # Absolutize the filename to avoid the requirement of being in the # same directory as the .changes file. diff --git a/daklib/holding.py b/daklib/holding.py index f77416ca..2f36a696 100644 --- a/daklib/holding.py +++ b/daklib/holding.py @@ -45,11 +45,14 @@ class Holding(object): self.initialised = True self.in_holding = {} - self.holding_dir = Config()["Dir::Queue::Holding"] + self.holding_dir = Config()["Dir::Holding"] # ftptrainees haven't access to holding, use a temp directory instead if not os.access(self.holding_dir, os.W_OK): self.holding_dir = Config()["Dir::TempPath"] + def chdir_to_holding(self): + os.chdir(self.holding_dir) + def copy_to_holding(self, filename): base_filename = os.path.basename(filename)