提交 bf489cbe 编写于 作者: J James Troup

real_arch, stolen from ziyi, moved to utils, use where useful

上级 9874d8cd
......@@ -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);
......
# 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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册