Sparation de la gnration de la liste des paquets pour testing/pas testing
darcs-hash:20080217233321-61eff-65b9a6f448e470c1ea525b2b54c64cb19f4673aa.gz
This commit is contained in:
parent
9a5dd91558
commit
61ec58f133
1 changed files with 9 additions and 1 deletions
|
@ -33,8 +33,17 @@ def gen_rules(cache):
|
|||
doc = Document()
|
||||
root = doc.createElement("Rule")
|
||||
root.setAttribute("priority", "20")
|
||||
if "sid" in file("/etc/debian_version").read():
|
||||
distribution = doc.createElement("Group")
|
||||
distribution.setAttribute("name", "debian-testing")
|
||||
else:
|
||||
distribution = doc.createElement("Group")
|
||||
distribution.setAttribute("name", "debian-testing")
|
||||
distribution.setAttribute("negate", "true")
|
||||
group = doc.createElement("Group")
|
||||
group.setAttribute("name", commands.getoutput("uname -m"))
|
||||
root.appendChild(distribution)
|
||||
distribution.appendChild(group)
|
||||
|
||||
pkgs = []
|
||||
for pkg in cache:
|
||||
|
@ -46,7 +55,6 @@ def gen_rules(cache):
|
|||
pkginfo.setAttribute("name", name)
|
||||
pkginfo.setAttribute("version", version)
|
||||
group.appendChild(pkginfo)
|
||||
root.appendChild(group)
|
||||
return root
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue