The following patch removes the need for python-xml.
Note that python-xml is currently really a run-time dependency, not a
build-dependency.
Ben.
diff -Nru discover-data-2.2008.06.25/debian/control discover-data-2.2008.06.25+nmu1/debian/control
--- discover-data-2.2008.06.25/debian/control 2008-01-12 19:31:13.000000000 +0000
+++ discover-data-2.2008.06.25+nmu1/debian/control 2009-08-27 01:16:31.000000000 +0100
@@ -4,7 +4,7 @@
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Uploaders: Petter Reinholdtsen <pere@debian.org>, Otavio Salvador <otavio@debian.org>, David Nusinow <dnusinow@debian.org>, Gaudenz Steinlin <gaudenz@debian.org>
Build-Depends: debhelper (>= 4.0)
-Build-Depends-Indep: python, python-xml
+Build-Depends-Indep: python
Standards-Version: 3.7.3
XS-Vcs-Svn: svn://svn.debian.org/pkg-discover/discover-data/trunk
diff -Nru discover-data-2.2008.06.25/reduce-xml discover-data-2.2008.06.25+nmu1/reduce-xml
--- discover-data-2.2008.06.25/reduce-xml 2005-07-17 13:12:58.000000000 +0100
+++ discover-data-2.2008.06.25+nmu1/reduce-xml 2009-08-27 01:37:48.000000000 +0100
@@ -10,8 +10,6 @@
import getopt
import xml.dom
import xml.dom.minidom
-import xml.dom.ext
-from xml.dom.ext.reader import Sax2
try:
True
@@ -27,7 +25,6 @@
"classspec": [],
"classversion": "",
"modlistfile": "",
- "use-minidom": True,
"debug": False
}
@@ -183,14 +180,7 @@
bus_info = {}
for fn in config["filelist"]:
try:
- if config["use-minidom"]:
- document = xml.dom.minidom.parse(fn)
- else:
- f = open(fn)
- reader = Sax2.Reader()
- document = reader.fromStream(f)
- f.close()
-
+ document = xml.dom.minidom.parse(fn)
bus_id = document.documentElement.attributes["bus"].value
except:
sys.stderr.write("warning: couldn't parse %s, skipping.\n"
@@ -257,7 +247,8 @@
nnode = data_node.childNodes[0]
while len(npath) > 0 and nnode is not None:
while nnode is not None and \
- not nnode.hasAttributes():
+ nnode.nodeType != \
+ xml.dom.Node.ELEMENT_NODE:
nnode = nnode.nextSibling
if nnode is None:
continue
@@ -318,7 +309,7 @@
else:
out_file = open(config["outfile"], "w")
- xml.dom.ext.PrettyPrint(out, out_file)
+ out.writexml(out_file, encoding="UTF-8")
except UsageError, e:
sys.stderr.write(sys.argv[0] + ": " + str(e) + "\n")
--- END ---
--
Ben Hutchings
If at first you don't succeed, you're doing about average.
Attachment:
signature.asc
Description: This is a digitally signed message part