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

Re: How to install debian-goodies in CLI environment?



Le 16/08/2022 à 18:37, Tim Woodall a écrit :
On Tue, 16 Aug 2022, G?khan Bag wrote:

I found that the installation of the package debian-goodies always prompts the popularity contest configuration, and that way, I can't install debian-goodies
in a script.

I also tried: echo "" | apt install debian-goodies -y
And: yes | apt install debian-goodies -y
I tried both apt and apt-get.

How can I install debian-goodies in a script without manual user interaction?


Don't know if this will work for debian-goodies but this is the best
I've found for silencing any questions:
DEBIAN_FRONTEND=noninteractive apt-get -o APT::Install-Recommends=false
-o Dpkg::Options::="--force-confdef" -o
Dpkg::Options::="--force-confold" -y install $source_deps </dev/null

You may possibly want to tweak or remove some of those options...

popularity-contest package relies on debconf durring installation for its configuration, like many other packages. In my opinion, the best way for an unattended installation is to populate the debconf database with the answer before installing the package. To do this, install debconf-utils, and run `debconf-get-selections` from a machine where popularity contest has already been installed to retrieve the question and its answer. Then, in your script, install debconf-utils, run `debconf-set-selections` with appropriate values and finally install your package. Have a look at `debconf-set-selections` for examples.

Regards,
Yvan

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: