Specify in apt-get options for dpkg
Hello,
I need to specify options --force-confdef --force-confold for dpkg in
apt-get command line.
In apt.conf manual written:
---cite---
...
Lists can be created by opening a scope and including a single word
enclosed in quotes followed by a semicolon. Multiple entries can be
included, each separated by a semicolon.
...
All of the APT tools take a -o option which allows an arbitrary
configuration directive to be specified on the command line. The
syntax is a full option name (APT::Get::Assume-Yes for instance)
followed by an equals sign then the new value of the option. Lists
can be appended too by adding a trailing :: to the list name.
...
---end-cite---
I write simple wrapper for dpkg for look how it invoked:
vdeb31:~# cat /usr/bin/dpkg
#!/bin/bash
echo "dpkg called with following parametrs:"
for i
do
echo $i >/dev/stderr
done
/usr/bin/dpkg.orig "$@"
And try following:
vdeb31:~# apt-get -o 'Dpkg::options::={"--force-confdef"; "--force-confold";};' install strace
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
strace
0 upgraded, 1 newly installed, 0 to remove and 98 not upgraded.
Need to get 0B/90.7kB of archives.
After unpacking 205kB of additional disk space will be used.
dpkg called with following parametrs:
{"--force-confdef"; "--force-confold";}; <=== !!!
--unpack
/var/cache/apt/archives/strace_4.5.8-1.2_i386.deb
dpkg: need an action option
... (followed output skipped)
(installation of package strace not required these options, it's for example only)
Also I try vary this option, but without result :-(
How I can to specify options list with "apt-get -o " ?
It need be writted in manual for APT.
--
Alexander Sashnov
E-mail: asashnov@plesk.ru
ICQ UIN: 79404252
Reply to: