Hello,

Quoting Guillem Jover (2023-06-14 20:29:17)
> > I'm quite certain about the version requirement because I did tests using
> > debbisect and using the suggestion below I'm able to create chroots for all
> > of unstable since 2006-08-10.
> 
> So just to clarify, old and new dpkg in normal conditions works fine
> for a long time when the available file is not present (since 1.17.11 as
> you point out). The problem here as hinted at below is that apt tries to
> set the package selections via «dpkg --set-selections» after having
> refreshed the available file via «dpkg --merge-avail» where both these
> commands fail if the available file is missing with versions earlier
> than 1.20.0.

aha, then I tested the wrong thing! I'm now able to verify the correct dpkg
version required for dpkg --set-selections without /var/lib/apt/available
using:

debbisect --depends=dpkg --cache=./cache 20200627T025456Z 20200627T085709Z '! 
echo | /usr/sbin/chroot "$1" dpkg --set-selections'
...
bisection finished successfully
  last good timestamp: 20200627T025456Z
  first bad timestamp: 20200627T085709Z
only one package differs: dpkg 1.19.7 -> 1.20.1

> > Try running mmdebstrap with
> > 
> >     --hook-dir=/usr/share/mmdebstrap/hooks/jessie-or-older
> > 
> > which will unconditionally do certain things only necessary for old 
> > releases.
> > 
> > If you instead use
> > 
> >     --hook-dir=/usr/share/mmdebstrap/hooks/maybe-jessie-or-older
> > 
> > some detection code will only run the hook if necessary (in case you do not
> > know upfront which release you are creating a chroot for).
> 
> Yeah I mentioned this also to Mika, but also encouraged him to file
> this report as I think it might make sense for these hooks to be
> adapted to cover up to buster out of the box.
> 
> Initially I thought that perhaps only the variants that end up with
> apt installed so that it can work correctly, but given that with older
> dpkg versions some of these actions will always fail, then perhaps it
> makes sense to still add those unconditionally so that users do not
> need to create the file manually if they use the other dpkg actions.
> 
> (Hope this clarifies things! :)

yes, thank you for finding and reporting this bug!

I'm unsure how to fix it... maybe by introducing a maybe-buster-or-older hook
which automatically pulls in the jessie-or-older hook?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to