Passing APT_OPTS in gdebi

Asked by Amit Uttamchandani

The gdebi CLI has an option to set APT_OPTS however I couldn't figure out how it is used. It would be great if there were some examples provided in the man page.

For example, how do I set "--force-yes" and "-y" options for apt using gdebi?

Thanks.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu gdebi Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

I have never tried this myself, but reading the man pages for gdebi, apt-get and apt.conf let me assume that setting the --force-yes and -y options is via the command

gedbi --option=APT::Get::force-yes,APT::Get::Assume-Yes [package.deb]...

Revision history for this message
Amit Uttamchandani (amit-uttam) said :
#2

Thanks for the reply.

Running the above command gives the following message:

Configuration items must be specified with a =<value>

Changing the command to:

sudo gdebi --option=APT::Get::force-yes=1,APT::Get::Assume-Yes=1 -n test.deb

or changing '1' to 'True' and 'true' did not give the error message but also did not give the desired behavior.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

You can set things in /etc/apt/apt.conf too. I don't suggest you add this.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Meanwhile I have installed gdebi on my own system and tried setting options via the -o option, and failed as you did.

Also separating the options into
sudo gdebi --option=APT::Get::force-yes="true" --option=APT::Get::Assume-Yes="true" -n test.deb
did not help.

Maybe starting the program with
echo y | gdebi [package.deb]...
helps doing what you want?

Another possibility coming to my mind is that you use dpkg instead of gdebi (with the problem that you have to ensure yourself, that the dependencies are met).

Revision history for this message
Amit Uttamchandani (amit-uttam) said :
#5

Thanks for the reply.

I was using dpkg before and might have to go back to doing that.

Right now, before calling gdebi, I preset deconf using *debconf-set-selections*. That seems to work, although it is an extra step.

I'm just wondering if setting options using gdebi works at all? I guess I can start debugging the code and finding out what is going on internally.

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Tim White (timwhite88) said :
#7

For anyone googling, I can't give the correct format for APT::Get options, however the following worked for me for APT::Install- options.

gdebi -o APT::Install-Recommends=0 -o APT::Install-Suggests=0 .....

Revision history for this message
Aris Synodinos (arissynod) said :
#8

For anyone googling, it's pretty simple:
sudo gdebi --non-interactive "FILENAME"