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

Re: merged-/usr-via-symlinks vs a-different-layout



On Tue, 2019-02-19 at 08:54:12 +0100, Ansgar wrote:
> Guillem Jover writes:
> > 3) Switching packages to the merged-/usr layout could have been
> >    accomplished automatically via debhelper for a coverage of around
> >    99% (?) of the archive. With something along the lines of:
> >
> >      ,---
> >      D=debian/tmp
> >      for d in /bin /sbin /lib; do
> >        for p in $(find $D/$d ! -type d); do
> >          b="${p##$D/}"
> >          m="$D/usr$b"
> >          if [ ! -e "$m" ]; then
> >            mkdir -p "$(dirname $m)"
> >            mv "$p" "$m"
> >            ln -s "${m##$D}" "$p"
> >          fi
> >        done
> >      done
> >      `---
> >
> >    With the property that it would handle gracefully all cases were the
> >    maintainer has checked that no compat symlinks are required and has
> >    then progressively moved the pathname installation to their final
> >    destination under /usr.
> 
> That is not merged-/usr, but a different filesystem layout.
> 
> So, no, it is not possible to switch packages to merged-/usr this way.

You are still conflating the concept with the deployment. The
underlaying properties of merging /usr is that the contents for
directories that are present in both / and /usr get merged into
/usr.

See for example OpenSUSE which did this transition correctly:

  <https://en.opensuse.org/openSUSE:Usr_merge>

> > 4) Due to having to support the broken merged-/usr-via-symlinks
> >    deployment, when we want to move the contents of the binary
> >    packages to the merged-/usr layout, we require now to include tons
> >    of logic in (probably new) maintainer scripts, when we have been
> >    trying to remove them altogether. :( With even more files untracked
> >    by dpkg itself, bypassing the packaging system even more, when the
> >    compat symlinks could have been shipped in the binary packages.
> 
> As far as I know maintainer scripts are only required for moving files
> from / to /usr when (a) a compat symlink is required, and (b) only when
> both merged-/usr and non-merged-/usr is supported.

I guess you are implying that we should start forcing and requiring
the broken deployment into all Debian systems… if that ever happens
I'm personally going to use any local technical means to avoid such
breakage to damage any of my systems…

Regards,
Guillem


Reply to: