On Wed, 25 Mar 2020 at 13:15:03 +, Aurelien Jarno wrote:
> debian/debhelper.in/libc.preinst, debian/rules.d/debhelper.mk: there is no
> easy way to check if a file belongs to a package with usrmerge. Just drop all
> safety checks... Closes: #954915.
The /usr merge merges /foo with /usr/foo (for some values of foo) and
nothing else, so if you would prefer to keep those checks, you could do
something like this:
if dpkg-query -S "${lib#/usr}" >/dev/null 2>&1 ; then
continue
fi
if dpkg-query -S "/usr${lib#/usr}" >/dev/null 2>&1 ; then
continue
fi
which will in particular treat /usr/lib/whatever as equivalent to
/lib/whatever.
(And the same for the quicker check involving libcfiles - but I don't
understand how or whether that one works, because it seems to be telling
grep to look for ^ and $ as literals rather than as anchors, which seems
wrong to me. But perhaps I'm missing something there.)
smcv