Commit 73031a18 authored by Jeremie Dimino's avatar Jeremie Dimino

tri des paquets

darcs-hash:20080209184855-af139-b996c2e99bf0d8b7ef2bf179c29441a54bc75aa9.gz
parent f112789a
......@@ -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__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment