On Mon, Aug 26, 2002 at 09:31:34PM +0100, Rob Bradford wrote: > I have written a python script that allows you to compares locally > installed packages with those on security.debian.org. Furthermore it > provides a description of the problem/DSA name if the package is > mentioned in the DSA RDF. > > The script is intended to be run as a normal user in a crontab, and thus > produces no output if the system is completely upto date. > > You will need to install python2.2 and python2.2-xml prior to using the > script which can be found at > http://www.robster.org.uk/files/security-update-check.py
Great. Except that the DSA RDF starts with space space newline, which chokes SAX: [EMAIL PROTECTED] ~/bin]$ ./security-update-check Traceback (most recent call last): File "./security-update-check", line 85, in ? for advisory in parseDSA(): File "./security-update-check", line 23, in parseDSA dom = xml.dom.minidom.parse(rdf) File "/usr/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 962, in parse return _doparse(pulldom.parse, args, kwargs) File "/usr/lib/python2.1/site-packages/_xmlplus/dom/minidom.py", line 954, in _doparse toktype, rootNode = events.getEvent() File "/usr/lib/python2.1/site-packages/_xmlplus/dom/pulldom.py", line 265, in getEvent self.parser.feed(buf) File "/usr/lib/python2.1/site-packages/_xmlplus/sax/expatreader.py", line 208, in feed self._err_handler.fatalError(exc) File "/usr/lib/python2.1/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError raise exception xml.sax._exceptions.SAXParseException: <unknown>:2:0: xml processing instruction not at start of external entity zsh: 12193 exit 1 ./security-update-check [EMAIL PROTECTED] ~/bin]$ It works just nicely with 2.1; on 2.2 it dies with [EMAIL PROTECTED] ~/bin]$ python2.2 ./security-update-check Traceback (most recent call last): File "./security-update-check", line 85, in ? for advisory in parseDSA(): File "./security-update-check", line 23, in parseDSA dom = xml.dom.minidom.parse(rdf) File "/usr/lib/python2.2/site-packages/_xmlplus/dom/minidom.py", line 962, in parse return _doparse(pulldom.parse, args, kwargs) File "/usr/lib/python2.2/site-packages/_xmlplus/dom/minidom.py", line 954, in _doparse toktype, rootNode = events.getEvent() File "/usr/lib/python2.2/site-packages/_xmlplus/dom/pulldom.py", line 265, in getEvent self.parser.feed(buf) File "/usr/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py", line 194, in feed self.reset() File "/usr/lib/python2.2/site-packages/_xmlplus/sax/expatreader.py", line 232, in reset self._parser = expat.ParserCreate(None, " ", intern = self._interning) TypeError: 'intern' is an invalid keyword argument for this function zsh: 12189 exit 1 python2.2 ./security-update-check [EMAIL PROTECTED] ~/bin]$ -- :(){ :|:&};: