> > Of course dpkg should be careful when replacing symlinks with
> > directories, because it's possible for a local admin to replace a
> > directory with a symlink for filesystem layout reasons.  But this
> > is the opposite case, and dpkg certainly has enough information to
> > know it is safe.

[Andreas Beckmann]
> No, dpkg has not enough information about what was a symlink or
> directory in the package. This will probably change with 1.17.x as
> Guillem plans to extend the metadata stored in the dpkg database.

When I say it "has enough information", I didn't mean the information
is necessarily stored in a convenient form by dpkg.  I don't know that.
What I mean is: (1) the old package ships /usr/share/doc/$pkg as a dir,
(2) the new package does not ship the dir, (3) no other package ships
the dir, (4) the dir is empty after the old package is removed.  That
is enough information for dpkg to correctly remove the directory when
you remove the package.  Thus it should also be enough information for
dpkg to remove the directory on upgrade.

> So for going from directory to a link you will need to add a postinst
> script that does something like this
> 
> if [ "$1" = configure ]; then
> if dpkg --compare-versions "$2" -lt FIXEDVERSION~ ; then
> if [ ! -l /u/s/d/$pkg ] && [ -d /u/s/d/$pkg ]; then
> rmdir /u/s/d/$pkg  # bombs if not empty
> ln -s $target /u/s/d/$pkg
> fi
> fi
> fi

I assume you mean [ -L ] rather than [ -l ] ... but other than that,
looks good.  I think the dpkg --compare-versions is not needed either,
except for the purpose of self-documentation - to make it obvious when
the postinst section can be removed from the packaging.

> Even if subversion 1.7 is not going into wheezy (is it?), this would
> become a problem for wheezy->jessie upgrades.

The release team blocked subversion 1.7 from wheezy even before the
freeze.  (The reason was a series of new bugs in other packages which,
I believe, have now been fixed for months.)  Given the rather huge diff
between 1.6 and 1.7, it is not worth their trouble to review it now, so
I have not asked them to.

But it _does_ mean that if I want to work around the dpkg bug, I'll
have to go through t-p-u.

Peter


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to