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

Re: Possibly quite a few bugs?



Daniel Burrows wrote:
> > ( ie echo "postrm called with unknown argument \`$1'" >&2 )
> 
>   These are probably generated by debhelper

No they arn't.

> (I know that I didn't write this code by hand for aptitude..),

Well then you copied it from someone, or used some template[1]. Debhelper
clearly delimits all changes it makes to package scripts, and it does
not contain the above text.

Anyway, "postrm called with unknown argument \`$1'" is perfectly valid
quoting in any posix shell that I know of, and I suspect the original
reporter is confused; is probably using an editor that does not properly
syntax highlight the scripts they are reading, and has not seen all the
packages they listed break. In other words, they are jumping to
very wrong conclusions on no evidence.

On the other hand, I'm quote familiar with their actual problem:

| 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.

It happens commonly when packages misuse dhelp in conjunction with the
FHS transition that that package handles so poorly. The fix is generally
to delete the crap dhelp leaves behind in /usr/doc in your preinst. 
r elsewhere. Here are some packages that already do that:

joey@kite:~>grep dhelp /var/lib/dpkg/info/*.preinst
/var/lib/dpkg/info/doc-base.preinst:    echo "removing old .dhelp files under /usr/doc/$package"
/var/lib/dpkg/info/doc-base.preinst:    if [ -f /usr/doc/$package/.dhelp ]; then
/var/lib/dpkg/info/doc-base.preinst:    dhelp_parse_fsstnd -d /usr/doc/$package/
/var/lib/dpkg/info/doc-base.preinst:    rm -f /usr/doc/$package/.dhelp
/var/lib/dpkg/info/doc-base.preinst:    if [ -f /usr/doc/$package/doc-base.html/.dhelp ]; then
/var/lib/dpkg/info/doc-base.preinst:    dhelp_parse_fsstnd -d /usr/doc/$package/doc-base.html/
/var/lib/dpkg/info/doc-base.preinst:    rm -f /usr/doc/$package/doc-base.html/.dhelp
/var/lib/dpkg/info/time.preinst:        # remove or purge. As dhelp drops this file here which is outside the 
/var/lib/dpkg/info/time.preinst:        if [ -f /usr/doc/time/.dhelp ]
/var/lib/dpkg/info/time.preinst:            rm /usr/doc/time/.dhelp
/var/lib/dpkg/info/xfig-doc.preinst:    /usr/doc/xfig-doc/html/.dhelp

-- 
see shy jo

[1] dh_make [2]
[2] dh_make is NOT a part of debhelper



Reply to: