]> git.decadent.org.uk Git - dak.git/commitdiff
config for show-deferred
authorThomas Viehmann <tv@beamnet.de>
Tue, 7 Oct 2008 20:31:41 +0000 (20:31 +0000)
committerThomas Viehmann <tv@beamnet.de>
Tue, 7 Oct 2008 20:31:41 +0000 (20:31 +0000)
config/debian/cron.hourly
config/debian/dak.conf
dak/show_deferred.py

index 57a63b2d867d3718defe9101caf6595edd1acedb..ce1d43e621c5f11acc8e3291600beaf72b1f7b3c 100755 (executable)
@@ -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
index 75ea43ef379e7895ed4ce7f29956f3be423c47d7..b8e1a4811f49a3e0a507f48feb844c8c516493ab 100644 (file)
@@ -129,6 +129,7 @@ Show-New
 Show-Deferred
 {
   LinkPath "/srv/ftp.debian.org/web/deferred/";
+  DeferredQueue "/srv/queued/DEFERRED/";
 }
 
 Import-Users-From-Passwd
index e718f74ad8a8062995c8ff4e077d08fab97e807c..6c24c23787aac7ba3162f447515e1435e85c5a60 100755 (executable)
@@ -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)