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

Re: Merging / and /usr (was: jessie release goals)



On Thu, May 09, 2013 at 11:50:31AM +0200, Goswin von Brederlow wrote:
> If you make /usr a symlink to / then there will be to distinct paths
> to each file and that will confuse dpkg.
> 
> The first problem that comes to mind is package A containing /bin/foo
> and package B containing /usr/bin/foo. Dpkg will happily install both
> without noticing the file overwrite conflict.
> 
> Or package A 1.0 contains /bin/foo and package A 1.1 contains
> /usr/bin/foo. IIrc then dpkg will unpack A 1.1 (overwrite /bin/foo
> with /usr/bin/foo) and then remove /bin/foo. Leaving you without
> /usr/bin/foo.

This is all very true.  Once we have /usr mounted in the initramfs,
we can correct such duplicate paths to prevent this; packages which
provide a binary in /bin and a symlink in /usr/bin to make the binary
available in early boot can simply move the binary back to /usr--it
will be guaranteed to be available in early boot.  Since two different
paths would then be effectively equivalent, maybe we might also need
dpkg itself to be aware of this so that it will refuse to overwrite,
in addition to a manual audit of the existing paths.

My current work on this is at
http://anonscm.debian.org/gitweb/?p=users/rleigh/initramfs-tools.git;a=shortlog;h=refs/heads/usrmount
It works for mounting a local /usr; testing NFS and NFS/local
combinations is on my TODO list for tonight.  This still needs further
cleanup and testing.  It will be ready for wider testing in a few days.
It also needs a patch to util-linux so it doesn't try to fsck a mounted
/usr at boot.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


Reply to: