From: James Troup Date: Sat, 8 Jun 2002 00:18:02 +0000 (+0000) Subject: real_arch, stolen from ziyi, moved to utils, use where useful X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf489cbe9c0556d9db0a44eca755a152a9b7965e;p=dak real_arch, stolen from ziyi, moved to utils, use where useful --- diff --git a/rene b/rene index 15d7cd0f..e4f570a1 100755 --- a/rene +++ b/rene @@ -2,7 +2,7 @@ # Check for obsolete binary packages # Copyright (C) 2000, 2001, 2002 James Troup -# $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); diff --git a/utils.py b/utils.py index 5089f203..4d6115b4 100644 --- a/utils.py +++ b/utils.py @@ -1,6 +1,6 @@ # Utility functions # Copyright (C) 2000, 2001, 2002 James Troup -# $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;