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

Re: Possibly quite a few bugs?

On Mon, Oct 02, 2000 at 10:56:23PM -0700, Joey Hess wrote:
> 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:
<SNIP examples>
Sorry for all the ruckus. It did indeed appear to be 'proper' to me, but
I can pinpoint a very specific example that lead to my investigation:

# Prerm

case "$1" in
    install-info --quiet --remove /usr/info/realtimebattle.info


     echo "prerm called with unknown argument \`$1'" >&2
     exit 0

# Automatically added by dh_installdocs
if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/realtimebattle ]; then
        rm -f /usr/doc/realtimebattle
# End automatically added section
# Automatically added by dh_installdocs
if [ "$1" = remove -o "$1" = upgrade ] && \
   command -v install-docs >/dev/null 2>&1; then
        install-docs -r realtimebattle
# End automatically added section

Everything looks fine, right? Note if this package is purged or removed, neither
of the Automatically added lines will exec. The only indication I could find as 
to why not, lead to me believe the quotes were not parsed correctly.

Good quotes or bad, this package and any others formed this way will not exec
the Automatically added portions on remove or purge on my machine.
Kernel 2.2.17, bash 2.04

I was just suggesting the quote change due to the fact that they actually work
after making the suggested changes.

Sorry for longwindedness... Just trying to help.

Gordon Sadler

Reply to: