[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Possibly quite a few bugs?



Sorry I couldn't be more descriptive with the subject, and I hope
I can make this clear to those reading this.

I encountered a rather odd thing the other day, some documentation
links with dhelp were still present even though I had used 
dpkg --purge to remove the package.

After further investigation I have uncovered what appears to be
a large number of bugs with the maintainer scripts. On my system
alone I have 26 packages that exhibit this problem.

Details:

A large number of maintainer scripts use a form of quoting in
the event the script was called with unknown arguments

( ie echo "postrm called with unknown argument \`$1'" >&2 )

However, those 'quotes' will cause any part of the script below
that point to become 'quoted' and therefore not run. This becomes
an issue when debhelper has inserted lines below here to remove
documentation and symlinks and such. The end result is the docs
are not deregistered with doc-base or the /usr/doc -> /usr/share/doc
symlink is never broken properly leaving dangling symlinks.

Proposed solution:

Change all instances of the above 'quotes' to one of 2 choices.

echo "postrm called with unknown argument \"$1\"" >&2
echo "postrm called with unknown argument "$1 >&2

Both of these work for the remainder of the script and seem
to produce the desired effect if the script is called with
unrecognized options.

Steps to check for problem on my system:

cd /var/lib/dpkg/info
grep 'called with unknown' *.p*

Examine output for 'bad quotes'
Unfortunately, EVERY package on my system using this technique
in its scripts uses this 'bad quote'

grep 'called with unk' *.p* |cut -d "." -f 1 |uniq

Used to get exact package listing from my system.


Following packages on my system show this behavior, but have
not checked every file to indeed determine if it will result
in 'breakage' for every package (ie debhelper or other commands
are below the 'quoting')

aptitude
bc
code-crusader
code-medic
developers-reference
dlocate
dpsclient
fdutils
findutils
gnu-standards
gs
ipchains
junkbuster
jx-lib
less
libc5
libproplist0
libwraster2
pdmenu
perl-5
pydb
python-base
realtimebattle
spf
ssh-askpass
ssh
time
vflib2
wmaker

Now the question is, does someone know of a good reason things
should be like this? Should I indeed file bugs against all of
these? Comments or other welcome.

I really enjoy Debian, been following it for a while now and I recall
someone sending numerous bugs against packages for not containing
build-depends? I don't think these are superfluous, they actually
result in breakage on my machine.

Gordon Sadler

p.s. Wow, just saw how long this post is, hope you can forgive the
extra verbage and just see it for what it is.



Reply to: