A few days I started seeing the following during an 'aptitude safe-upgrade' on my Debian/squeeze system:
Setting up python-central (0.6.16+nmu1) ...
pycentral: pycentral cleanup-pkgprepare-updates: found 37 dangling symlinks
pycentral: pycentral cleanup-pkgprepare-updates: checking for links owned by
packages (this may take some time)
warning, in file '/var/lib/dpkg/status' near line 5913 package 'dist':
missing description
Traceback (most recent call last):
File "/usr/bin/pycentral", line 2335, in <module>
main()
File "/usr/bin/pycentral", line 2329, in main
rv = action.run(global_options)
File "/usr/bin/pycentral", line 1902, in run
packaged = self.links_in_packages(dangling)
File "/usr/bin/pycentral", line 2005, in links_in_packages
self.locate(arg_list, cmd_list)
File "/usr/bin/pycentral", line 1974, in locate
fn = line.split(':', 1)[1][1:-11]
IndexError: list index out of range
dpkg: error processing python-central (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
python-central
Which would seem to be another instance of this bug. However the
workaround posted above doesn't appear to work:
if chunk_max == -1: chunk_max = 16384
(error with 'if chunk_max = -1: chunk_max = 16384') doesn't prevent the
error. Indeed if I put:
self.warn('chunk_max: %d' % chunk_max)
as line 1982 (just after the SC_ARG_MAX if/else) I get:
pycentral: pycentral cleanup-pkgprepare-updates: chunk_max: 2097152
Putting that warn() after the reduce() call gives:
pycentral: pycentral cleanup-pkgprepare-updates: chunk_max: 2095312
Aha! Putting a warn() to show the value of 'line' at line 1973 shows:
pycentral: pycentral cleanup-pkgprepare-updates: Line: missing description
So in fact although perhaps python-central should be more robust this is
actually happening because of how dpkg now moans if any package doesn't
have a Description field.
Adding a second test:
if line == 'missing description': continue
after the:
if line == '': continue
allows python-central to complete properly.
--
- Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/
Finger athan(at)fysh.org for PGP key
"And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME
signature.asc
Description: Digital signature

