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

Re: Bug#930788: creating /var/lib/dpkg/cmethopt



On Sun, 2019-06-23 at 21:32:19 +0200, Sven Joachim wrote:
> On 2019-06-20 18:19 +0200, Ansgar Burchardt wrote:
> > Package: apt,dselect
> > Severity: normal

> > today I learned that debootstrap as special code to create the file
> > /var/lib/dpkg/cmethopt (contents: "apt apt"); this is the function
> > setup_dselect_method in functions.  It seems wrong that debootstrap
> > has to know about such a particular detail.

This is related to
<https://wiki.debian.org/Teams/Dpkg/Spec/InstallBootstrap>. The
problem is that dselect conflates the selection of its access method
with its configuration, so when you choose the apt access method it
will try to reconfigure apt, which is annoying because debootstrap
already did configure it. So it does make sense to me that given that
debootstrap configured apt as the system access/download method it
would notify dselect of this fact, and not require the user to do
this again.

But I do agree that this is an internal implementation detail, and
deboostrap should be provided with a better interface.

> That code has been in debootstrap forever, at least since woody (the
> oldest version on snapshot.debian.org is 0.1.17.7woody1).  I suspect
> back in the days this was actually useful, but nowadays rather few
> people actually use dselect, and debootstrap should stop creating
> /var/lib/dpkg/cmethopt.

I guess that's another option, yes.

> > Alternatives to debootstrap might also not create the file at all.
> >
> > So I wonder if this could be created somewhere else.  An APT developer
> > said this is used by dselect and suggested to file a bug against
> > apt,dselect; he also had the idea that the file might be created in
> > dselect's postinst.
> 
> Makes sense, although dselect happily starts without that file; the
> admin would have to select an install method and had better know that
> they should choose "apt" from the list, but people willingly using
> dselect probably can be expected to know what they are doing.

I think dselect could get its access method selection split from
its configuration, maybe supporting something similar to the
alternatives system with auto/manual mode and priorities, etc.

Or perhaps the better option, is to switch its access method
configuration to use something like apt's sources.list format.

> Removing /var/lib/dpkg/cmethopt when dselect is purged seems also
> logical to me.

Right, I'll do that right away.

Thanks,
Guillem


Reply to: