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

apt-setup: db_input critical apt-setup/uri_type || exit 0 (Noninteractive)

I edit dbootstrap_settings to be :

db_set apt-setup/hostname sunsite.cnlab-switch.ch
db_set apt-setup/directory /ftp/mirror/debian/
db_set apt-setup/mirror sunsite.cnlab-switch.ch
db_set apt-setup/country Switzerland
db_set apt-setup/uri_type http
db_fset apt-setup/mirror seen true
db_fset apt-setup/uri_type seen true
db_fset apt-setup/country seen true
db_fset apt-setup/directory seen true

And then run
DEBIAN_FRONTEND=Noninteractive base-config

apt-setup always fails to create an /etc/apt/sources.list

If I change the line

db_input critical apt-setup/uri_type || exit 0
db_input critical apt-setup/uri_type || true

then it creates a valid apt-setup and everything works.

I think this is because debconf (or the non-interactive frontend)
skips db_input questions, but then db_get retrieves the value from
the config.db which has been preset. (The point
of noninteractive frontend no ?)

So, should the noninteractive frontend placate
db_inpute somehow, or should developers and
apt-setup in particular not use the 

db_input critical apt-setup/uri_type || exit 0

construct ? (the exit 0 part)

Is this a bug against debconf or apt-setup (base-config) ?

Kind regards,

--- Begin Message ---
This barfs.  Remove the exit 0
and things proceed normally on DEBIAN_FRONTEND=Noninteractive.


Noninteractive frontend is broken.  It should not SKIP the question.
Or.. apt-setup should not exit 0.

I am confused.


--- End Message ---

Reply to: