From: Thomas Viehmann Date: Tue, 7 Oct 2008 20:31:41 +0000 (+0000) Subject: config for show-deferred X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4174e2aacdbdfe37dad623ab5c9fe1522255d954;p=dak config for show-deferred --- diff --git a/config/debian/cron.hourly b/config/debian/cron.hourly index 57a63b2d..ce1d43e6 100755 --- a/config/debian/cron.hourly +++ b/config/debian/cron.hourly @@ -10,5 +10,5 @@ export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars date -u > $ftpdir/project/trace/ftp-master.debian.org dak import-users-from-passwd dak queue-report -n > $webdir/new.html -/srv/queued/debianqueued-0.9/show-deferred /srv/queued/DEFERRED/ > ${webdir}/deferred.html +dak show-deferred > ${webdir}/deferred.html cd $queuedir/new ; dak show-new *.changes > /dev/null diff --git a/config/debian/dak.conf b/config/debian/dak.conf index 75ea43ef..b8e1a481 100644 --- a/config/debian/dak.conf +++ b/config/debian/dak.conf @@ -129,6 +129,7 @@ Show-New Show-Deferred { LinkPath "/srv/ftp.debian.org/web/deferred/"; + DeferredQueue "/srv/queued/DEFERRED/"; } Import-Users-From-Passwd diff --git a/dak/show_deferred.py b/dak/show_deferred.py index e718f74a..6c24c237 100755 --- a/dak/show_deferred.py +++ b/dak/show_deferred.py @@ -164,9 +164,10 @@ def usage (exit_code=0): f = sys.stderr else: f = sys.stdout - print >> f, """Usage: dak show-deferred /path/to/DEFERRED - -h, --help show this help and exit. - -p, --html-path [path] override output directory. + print >> f, """Usage: dak show-deferred + -h, --help show this help and exit. + -p, --link-path [path] override output directory. + -d, --deferred-queue [path] path to the deferred queue """ sys.exit(exit_code) @@ -174,11 +175,17 @@ def init(): global Cnf, Options, Upload, projectB Cnf = utils.get_conf() Arguments = [('h',"help","Show-Deferred::Options::Help"), - ("p","link-path","Show-Deferred::LinkPath","HasArg")] + ("p","link-path","Show-Deferred::LinkPath","HasArg"), + ("d","deferred-queue","Show-Deferred::DeferredQueue","HasArg")] + args = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv) for i in ["help"]: if not Cnf.has_key("Show-Deferred::Options::%s" % (i)): Cnf["Show-Deferred::Options::%s" % (i)] = "" - args = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv) + for i,j in [("DeferredQueue","--deferred-queue")]: + if not Cnf.has_key("Show-Deferred::%s" % (i)): + print >> sys.stderr, """Show-Deferred::%s is mandatory. + set via config file or command-line option %s"""%(i,j) + Options = Cnf.SubTree("Show-Deferred::Options") if Options["help"]: usage() @@ -188,11 +195,11 @@ def init(): def main(): args = init() - if len(args)!=1: + if len(args)!=0: usage(1) filelist = [] - for r,d,f in os.walk(args[0]): + for r,d,f in os.walk(Cnf["Show-Deferred::DeferredQueue"]): filelist += map (lambda x: os.path.join(r,x), filter(lambda x: x.endswith('.changes'), f)) list_uploads(filelist)