tri des paquets
darcs-hash:20080209184855-af139-b996c2e99bf0d8b7ef2bf179c29441a54bc75aa9.gz
This commit is contained in:
parent
f112789a58
commit
73031a1829
1 changed files with 8 additions and 6 deletions
|
@ -36,15 +36,17 @@ def gen_rules(cache):
|
|||
group = doc.createElement("Group")
|
||||
group.setAttribute("name", commands.getoutput("uname -m"))
|
||||
|
||||
pkgs = []
|
||||
for pkg in cache:
|
||||
if pkg.candidateVersion:
|
||||
pkginfo = doc.createElement("Package")
|
||||
pkginfo.setAttribute("name", pkg.name)
|
||||
pkginfo.setAttribute("version", pkg.candidateVersion)
|
||||
group.appendChild(pkginfo)
|
||||
|
||||
pkgs.append((pkg.name, pkg.candidateVersion))
|
||||
pkgs.sort()
|
||||
for (name, version) in pkgs:
|
||||
pkginfo = doc.createElement("Package")
|
||||
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