]> git.decadent.org.uk Git - dak.git/blobdiff - dak/decode_dot_dak.py
merge ftpmaster branch
[dak.git] / dak / decode_dot_dak.py
old mode 100755 (executable)
new mode 100644 (file)
index 1712e4b..b6cee44
@@ -28,8 +28,8 @@
 
 import sys
 import apt_pkg
-import dak.lib.queue as queue
-import dak.lib.utils as utils
+import daklib.queue
+import daklib.utils
 
 ################################################################################
 
@@ -43,24 +43,24 @@ Dumps the info in .dak FILE(s).
 ################################################################################
 
 def main():
-    Cnf = utils.get_conf()
+    Cnf = daklib.utils.get_conf()
     Arguments = [('h',"help","Decode-Dot-Dak::Options::Help")]
     for i in [ "help" ]:
-       if not Cnf.has_key("Decode-Dot-Dak::Options::%s" % (i)):
-           Cnf["Decode-Dot-Dak::Options::%s" % (i)] = ""
+        if not Cnf.has_key("Decode-Dot-Dak::Options::%s" % (i)):
+            Cnf["Decode-Dot-Dak::Options::%s" % (i)] = ""
 
     apt_pkg.ParseCommandLine(Cnf, Arguments, sys.argv)
 
     Options = Cnf.SubTree("Decode-Dot-Dak::Options")
     if Options["Help"]:
-       usage()
+        usage()
 
-    k = queue.Upload(Cnf)
+    k = daklib.queue.Upload(Cnf)
     for arg in sys.argv[1:]:
-        arg = utils.validate_changes_file_arg(arg,require_changes=-1)
+        arg = daklib.utils.validate_changes_file_arg(arg,require_changes=-1)
         k.pkg.changes_file = arg
         print "%s:" % (arg)
-       k.init_vars()
+        k.init_vars()
         k.update_vars()
 
         changes = k.pkg.changes
@@ -77,13 +77,13 @@ def main():
             print "  %s: %s" % (i.capitalize(), " ".join(changes[i].keys()))
             del changes[i]
         # Optional changes fields
-        for i in [ "changed-by", "filecontents", "format" ]:
+        for i in [ "changed-by", "filecontents", "format", "adv id" ]:
             if changes.has_key(i):
                 print "  %s: %s" % (i.capitalize(), changes[i])
                 del changes[i]
         print
         if changes:
-            utils.warn("changes still has following unrecognised keys: %s" % (changes.keys()))
+            daklib.utils.warn("changes still has following unrecognised keys: %s" % (changes.keys()))
 
         dsc = k.pkg.dsc
         print " Dsc:"
@@ -94,7 +94,7 @@ def main():
                 del dsc[i]
         print
         if dsc:
-            utils.warn("dsc still has following unrecognised keys: %s" % (dsc.keys()))
+            daklib.utils.warn("dsc still has following unrecognised keys: %s" % (dsc.keys()))
 
         files = k.pkg.files
         print " Files:"
@@ -108,7 +108,7 @@ def main():
                     print "   %s: %s" % (i.capitalize(), files[file][i])
                     del files[file][i]
             if files[file]:
-                utils.warn("files[%s] still has following unrecognised keys: %s" % (file, files[file].keys()))
+                daklib.utils.warn("files[%s] still has following unrecognised keys: %s" % (file, files[file].keys()))
         print
 
         dsc_files = k.pkg.dsc_files
@@ -125,10 +125,9 @@ def main():
                     print "   %s: %s" % (i.capitalize(), dsc_files[file][i])
                     del dsc_files[file][i]
             if dsc_files[file]:
-                utils.warn("dsc_files[%s] still has following unrecognised keys: %s" % (file, dsc_files[file].keys()))
+                daklib.utils.warn("dsc_files[%s] still has following unrecognised keys: %s" % (file, dsc_files[file].keys()))
 
 ################################################################################
 
 if __name__ == '__main__':
     main()
-