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

Bug#207874: libkpathsea3: cannot upgrade when /usr/doc symlink to /usr/share/doc



On Sat, 30 Aug 2003, Hilmar Preusse wrote:

> On 30.08.03 Tim Connors (tconnors@astro.swin.edu.au) wrote:
>
> > The -e flag means that when rm -f returns 1 in libkpathsea3.postinst
> > when it can't rm the directory (because /usr/doc/tetex-lib is a
> > direcory, not a symlink, because I have symlinked /usr/share/doc back
> > to the old /usr/doc (which I prefer)). This breaks no other packages,
> > so I presume it is a libkpathsea3 bug.
> >
> > A simple workaround for me was just to remove the -e flag to sh.
> >
> > #!/bin/sh
> >
> > if [ "$1" = "configure" ]; then
> >   ldconfig
> > fi
> >
> > rm -f /usr/doc/tetex-lib
> > ....
> >
> Debian Policy Manual
> Chapter 6 - Package maintainer scripts and installation procedure
>
> The package management system looks at the exit status from these
> scripts. It is important that they exit with a non-zero status if
> there is an error, so that the package management system can stop its
> processing. For shell scripts this means that you almost always need
> to use set -e (this is usually true when writing shell scripts, in
>        ^^^^^^
> fact). It is also important, of course, that they don't exit with a
> non-zero status if everything went well.

So presumably one would want to '|| true' with the rm -f? A quick test
demonstrates this to work with 'sh -e' (and the bash manpage, under set,
says this works)

> so, what to do? rm -rf /usr/doc/tetex-lib? It's obsolete anyway.

Not that I claim to know the *correct* solution anyway...

Does the policy have anything to say about the transition from /usr/doc to
/usr/share/doc?

It may be obsolete for current unstable systems, but what if you were to
upgrade from an old stable - you would still need to get rid of any
/usr/doc/tetex-lib then, wouldn't you?

-- 
TimC -- http://astronomy.swin.edu.au/staff/tconnors/
"The thing I love most about deadlines is the wonderful WHOOSHing sound
they make as they go past" - DNA




Reply to: