From 61ec58f13381b96c5d2fbd53bc98195a19748526 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Mon, 18 Feb 2008 00:33:21 +0100 Subject: [PATCH] Sparation de la gnration de la liste des paquets pour testing/pas testing darcs-hash:20080217233321-61eff-65b9a6f448e470c1ea525b2b54c64cb19f4673aa.gz --- bcfg2/create-versions-index.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bcfg2/create-versions-index.py b/bcfg2/create-versions-index.py index bee30f58..14f00f58 100755 --- a/bcfg2/create-versions-index.py +++ b/bcfg2/create-versions-index.py @@ -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__":