]> git.decadent.org.uk Git - dak.git/commitdiff
real_arch, stolen from ziyi, moved to utils, use where useful
authorJames Troup <james@nocrew.org>
Sat, 8 Jun 2002 00:18:02 +0000 (00:18 +0000)
committerJames Troup <james@nocrew.org>
Sat, 8 Jun 2002 00:18:02 +0000 (00:18 +0000)
rene
utils.py

diff --git a/rene b/rene
index 15d7cd0f6d6a1d83f3b5518ecf2c0ea913c2daaf..e4f570a15b5156d9392aa42380fbde9650813f44 100755 (executable)
--- a/rene
+++ b/rene
@@ -2,7 +2,7 @@
 
 # Check for obsolete binary packages
 # Copyright (C) 2000, 2001, 2002  James Troup <james@nocrew.org>
-# $Id: rene,v 1.12 2002-05-14 15:33:32 troup Exp $
+# $Id: rene,v 1.13 2002-06-08 00:18:02 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
@@ -132,10 +132,8 @@ def main ():
         os.unlink(temp_filename);
 
     for component in components:
-        architectures = Cnf.ValueList("Suite::%s::Architectures" % (suite));
+        architectures = filter(utils.real_arch, Cnf.ValueList("Suite::%s::Architectures" % (suite)));
         for architecture in architectures:
-            if [ "source", "all" ].count(architecture) != 0:
-                continue;
             filename = "%s/dists/%s/%s/binary-%s/Packages" % (Cnf["Dir::Root"], suite, component, architecture);
             packages = utils.open_file(filename);
             Packages = apt_pkg.ParseTagFile(packages);
index 5089f203710a7e7b33e01a2d2add408d5c0abfcb..4d6115b4d819fe173555744002afdde080e78286 100644 (file)
--- a/utils.py
+++ b/utils.py
@@ -1,6 +1,6 @@
 # Utility functions
 # Copyright (C) 2000, 2001, 2002  James Troup <james@nocrew.org>
-# $Id: utils.py,v 1.46 2002-05-23 12:36:15 troup Exp $
+# $Id: utils.py,v 1.47 2002-06-08 00:18:02 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
@@ -530,6 +530,11 @@ def validate_changes_file_arg(file, fatal=1):
 
 ################################################################################
 
+def real_arch(arch):
+    return (arch != "source" and arch != "all");
+
+################################################################################
+
 def get_conf():
        return Cnf;