Re: FHS: Wholesale conversion is wrong
Yann Dirson wrote:
> Richard Braakman writes:
> > 3. Ensure that dpkg can handle a package upgrade that moves a
> > directory and replaces it with a symlink to the new location.
> > Brandon Robinson ran into problems when he did this in xbase.
>
> He's not the only one. I was hit by this with 2 packages, which ended
> in `rm -rf's in preinst script to turn around this. I sent a simple
> test-case in a bug-report, and got positive feedback from Ian or Klee
> (don't remember), telling they were already investigating this
> problem.
>
> I'd add that both replacing a plain dir with a symlink, and replacing
> a symlink with a plain dir cause problems to dpkg 1.4.0.x. Never
> tried 1.4.1.x. You've been warned ;)
I've tried to think of a way around this, but it may well be fatal for
my proposal. I see two ways to deal with the dpkg issue:
- Fix the bug in dpkg, and have FHS-compliant packages assume the
bug is fixed. This means everyone has to upgrade dpkg before
installing anything else from slink.
(This can't be captured in package relationships. Even a Pre-Depends
on the fixed dpkg will not affect a running dpkg. We'd have to
handle it just like the introduction of epochs.)
- Put code in the preinst to move directories and install symlinks,
for every package that needs to. (And code in the postrm to unwind
this, when downgrading!)
Disadvantage: This is icky code, and I don't have confidence that
every package will do it right. If we provide a tool for it, then
everyone will have to install the tool before installing anything
else from slink. That would be about equivalent to having every
package depend on a "fhs" package, so we might as well go that way
instead.
Either way, I think the disadvantages will outweigh the advantages
that can be gained from my proposal. I regretfully retract it.
Richard Braakman
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: