]> git.decadent.org.uk Git - dak.git/blobdiff - tea
Add new top level directories
[dak.git] / tea
diff --git a/tea b/tea
index 6ef3588357948b21360de3686682da095c1d2052..228fd81ec896427c3b2004b45a17aa8a3b97b745 100755 (executable)
--- a/tea
+++ b/tea
@@ -2,7 +2,7 @@
 
 # Various different sanity checks
 # Copyright (C) 2000, 2001, 2002, 2003, 2004  James Troup <james@nocrew.org>
-# $Id: tea,v 1.29 2004-09-01 07:52:15 rmurray Exp $
+# $Id: tea,v 1.31 2004-11-27 18:03:11 troup Exp $
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -126,7 +126,7 @@ def check_dscs():
         for line in list_file.readlines():
             file = line[:-1];
             try:
-                utils.parse_changes(file, dsc_whitespace_rules=1);
+                utils.parse_changes(file, signing_rules=1);
             except utils.invalid_dsc_format_exc, line:
                 utils.warn("syntax error in .dsc file '%s', line %s." % (file, line));
                 count += 1;
@@ -139,7 +139,7 @@ def check_dscs():
 def check_override():
     for suite in [ "stable", "unstable" ]:
         print suite
-        print "-------------"
+        print "-"*len(suite)
         print
         suite_id = db_access.get_suite_id(suite);
         q = projectB.query("""
@@ -321,16 +321,23 @@ def validate_sources(suite, component):
 ########################################
 
 def validate_packages(suite, component, architecture):
-    filename = "%s/dists/%s/%s/binary-%s/Packages" \
+    filename = "%s/dists/%s/%s/binary-%s/Packages.gz" \
                % (Cnf["Dir::Root"], suite, component, architecture);
     print "Processing %s..." % (filename);
-    packages = utils.open_file(filename);
+    # apt_pkg.ParseTagFile needs a real file handle and can't handle a GzipFile instance...
+    temp_filename = utils.temp_filename();
+    (result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename));
+    if (result != 0):
+        sys.stderr.write("Gunzip invocation failed!\n%s\n" % (output));
+        sys.exit(result);
+    packages = utils.open_file(temp_filename);
     Packages = apt_pkg.ParseTagFile(packages);
     while Packages.Step():
         filename = "%s/%s" % (Cnf["Dir::Root"], Packages.Section.Find('Filename'));
         if not os.path.exists(filename):
             print "W: %s missing." % (filename);
     packages.close();
+    os.unlink(temp_filename);
 
 ########################################