On 10/12/2022 04.26, Marco d'Itri wrote:
On Nov 21, Luca Boccassi <bl...@debian.org> wrote:

We could add a versioned Depends on libc6 (and the equivalent libcX on
!linux)) to usrmerge (and usr-is-merged) to ensure a "fixed" libc is
already installed (and only "fixed" libc-foo packages can be installed
afterwards). That Depends should be sufficient to also keep out older
libc-foo since iirc libc6 and libc6-foo are (transitively) version-locked).
Does this look right to everybody?

https://salsa.debian.org/md/usrmerge/-/commit/7284cd4b4b40231b3d4a1ef56d9217091e714b91

That looks OK, but I don't know the code ...

We also need a similar change in debootstrap: in setup_merged_usr(),
skip adding the biarch directories on bullseye or newer.

I don't exactly know how debootstrap works, but IIRC it extracts the -debs "manually" in the first stage, i.e. without running scripts. So the preinst in the libc* packages does not set up the symlinks first ... and the "manual" symlink farm creation is still neccessary. But this probably creates more symlinks than strictly needed (but what was actually needed can only be said for sure after bootstrapping), so debootstrap should clean up "unowned" links after the bootstrap has finished. These unowned links could otherwise confuse piuparts if they turn into "owned" state during installation of the test package and therefore get "removed" during removal of the test package, causing piuparts to flag a "disappearance".

Some completely untested code that could  do this cleanup:

for d in /lib32 /lib64 /libo32 /libx32
do
  test -L $d || continue
  if not dpkg-query -S $d >/dev/null 2>&1 ; then
    rm $d
    if not dpkg-query -S /usr$d >/dev/null 2>&1 ; then
      rmdir /usr$d
    fi
  fi
done

Andreas

Reply via email to