Bug#333294: [Pbuilder-maint] Bug#333294: Info received (A patch for the default mirror)
Eddy Petrișor
eddy.petrisor at gmail.com
Fri Mar 14 16:35:08 UTC 2008
Eddy Petrișor wrote:
> Junichi Uekawa wrote:
>> Hi,
>>
>>> OK, I have also fixed this for the noninteractive default case.
>>>
>>> I also updated the Romanian translation to be back to 100%.
>>>
>>
>> I've noticed that it's done in postinst, and not in config script.
>> That'll set questions back until later, and pause installation
>> half-way.
>
> I made the necessary changes and turned that postinst into .config, and
> made a test in a cowshell (I forcefully purged pbuilder (what could have
> gone wrong ;-) and tried to install it via dpkg).
>
> Th eproblem is that when installed via dpkg, that config script is not
> ran at all and it seems that the config script is called only by upper
> layers (dpkg-reconfigure seems to be one).
>
>
> <eddyp_work> The config script might be run before the preinst script,
> and before the package is unpacked or any of its dependencies or
> pre-dependencies are satisfied. <<<<< when does that "might" apply?
> <sgran> eddyp_work: preconfigure
> <sgran> IIRC
> <eddyp_work> sgran: but on a normal install that script is not called ....
> <eddyp_work> sgran: I just tested and is doesn't run it at all
> <sgran> interesting
> <sgran> do you see apt saying "preconfiguring packages ...."
> <eddyp_work> sgran: I used plain dpkg
> <sgran> hence the 'might', I suppose
> <eddyp_work> sgran: so preconfigure is ran only when installing via apt?
> <eddyp_work> that would suck big time
> <sgran> you should probably ask someone who is actually sure of these
> things, but that's my memory, yes
> <eddyp_work> sgran: indicating such a person would be welcome
> <sgran> maybe the other frontends do it as well, I don't know
> <eddyp_work> sgran: the weird part is that dpkg-reconfigure does call it
> ....
> <eddyp_work> I suppose it does it itself, i.e. id not dpkg doing that
> <eddyp_work> s/id/is/
>
> It seems that there is a dpkg-preconfigure which is called by
> /etc/apt/apt.conf.d/70debconf, but that is optional:
>
> bounty:/# cat /etc/apt/apt.conf.d/70debconf
> // Pre-configure all packages with debconf before they are installed.
> // If you don't like it, comment it out.
> DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
About this debconf(7) says:
Preconfiguring packages
Debconf can configure packages before they are even installed onto your system. This
is useful
because it lets all the questions the packages are going to ask be asked at the
beginning of an
install, so the rest of the install can proceed while you are away getting a cup of coffee.
If you use apt (version 0.5 or above), and you have apt-utils installed, each package apt
installs
will be automatically preconfigured. This is controlled via /etc/apt/apt.conf.d/70debconf
Sometimes you might want to preconfigure a package by hand, when you’re not installing it
with apt.
You can use dpkg-preconfigure (8) to do that, just pass it the filenames of the packages you
want to
preconfigure. You will need apt-utils installed for that to work.
>> Unless it's really required to be that way, could you fix that?
>
> I really dislike this limitation....
>
> I wouldn't do this, I'd just keep the current postinst script and ask
> the question when doing the automatic detection at low priority, to
> avoid user interaction and require interaction only in the exceptional
> situation when the autodetection failed (that should only happen only
> when there's no deb line in any of the sources.list files).
Just looked over debconf (7) and I must say that we can safely use a low prio for the default
detection question:
Priorities
Another nice feature of debconf is that the questions it asks you are prioritized. If you
don’t want
to be bothered about every little thing, you can set up debconf to only ask you the most
important
questions. On the other hand, if you are a control freak, you can make it show you all
questions.
Each question has a priority. In increasing order of importance:
low Very trivial questions that have defaults that will work in the vast majority of cases.
medium Normal questions that have reasonable defaults.
high Questions that don’t have a reasonable default.
Since in the vast majority of cases the sources list will contain a 'deb http...' source, I'd say
this is safe.
> What do you say?
>
--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
More information about the Pbuilder-maint
mailing list