]> err.no Git - dak/commitdiff
Added directories option to the queue report
authorMichael Casadevall <sonicmctails@gmail.com>
Tue, 30 Dec 2008 15:54:00 +0000 (10:54 -0500)
committerMichael Casadevall <sonicmctails@gmail.com>
Tue, 30 Dec 2008 15:54:00 +0000 (10:54 -0500)
Signed-off-by: Michael Casadevall <sonicmctails@gmail.com>
ChangeLog
dak/queue_report.py

index d550ecdacfcf1b7f3d525407ff703920820d4635..69a0efae77e1a7f7049892f2015320f45a7ae668 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-30  Michael Casadevall <sonicmctails@gmail.com>
+
+       * dak/queue_report.py   - Added directories option to queue report
+
 2008-12-28  Frank Lichtenheld  <djpig@debian.org>
 
        * dak/override.py (main): Handle source-only packages better
index 31b11d8dd0c0957f0eafa22c4b5279c0c942d263..cdc489c855f2e8a59173216109b4b614399c2a6a 100755 (executable)
@@ -58,6 +58,7 @@ Prints a report of packages in queue directories (usually new and byhand).
   -s, --sort=key            sort output according to key, see below.
   -a, --age=key             if using sort by age, how should time be treated?
                             If not given a default of hours will be used.
+  -d, --directories=key     A comma seperated list of directories to be scanned
 
      Sorting Keys: ao=age,   oldest first.   an=age,   newest first.
                    na=name,  ascending       nd=name,  descending
@@ -515,7 +516,8 @@ def main():
                  ('n',"new","Queue-Report::Options::New"),
                  ('8','822',"Queue-Report::Options::822"),
                  ('s',"sort","Queue-Report::Options::Sort", "HasArg"),
-                 ('a',"age","Queue-Report::Options::Age", "HasArg")]
+                 ('a',"age","Queue-Report::Options::Age", "HasArg"),
+                 ('d',"directories","Queue-Report::Options::Directories", "HasArg")]
     for i in [ "help" ]:
         if not Cnf.has_key("Queue-Report::Options::%s" % (i)):
             Cnf["Queue-Report::Options::%s" % (i)] = ""
@@ -531,8 +533,14 @@ def main():
     if Cnf.has_key("Queue-Report::Options::New"):
         header()
 
-    directories = Cnf.ValueList("Queue-Report::Directories")
-    if not directories:
+    directories = [ ]
+
+    if Cnf.has_key("Queue-Report::Options::Directories"):
+        for i in Cnf["Queue-Report::Options::Directories"].split(","):
+            directories.append(i)
+    elif Cnf.has_key("Queue-Report::Directories"):
+        directories = Cnf.ValueList("Queue-Report::Directories")
+    else:
         directories = [ "byhand", "new" ]
 
     f = None