[Aptitude-devel] Bug#702561: aptitude: resolver hints (Aptitude::ProblemResolver::Hints=reject openssh-server :UNINST) being ignored
Axel Beckert
abe at debian.org
Fri Mar 8 11:58:11 UTC 2013
Package: aptitude
Version: 0.6.8.2-1
Severity: normal
Hi,
according to http://people.debian.org/~abe/aptitude/en/ch02s03s05.html
"reject aptitude :UNINST" will prevent the resolver from accepting
solutions which remove aptitude.
I tried to make the following command (which is a stripped-down version
of a command that aptitude-robot would execute) not removing
openssh-server under any circumstances:
# aptitude full-upgrade '~U' openssh-client+ openssh-server:
The following packages will be REMOVED:
libbsd0{u} libedit2{u} openssh-client{u}
0 packages upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 2665 kB will be freed.
The following packages have unmet dependencies:
openssh-server : Depends: openssh-client (= 1:6.0p1-3) but it is not
going to be installed.
The following actions will resolve these dependencies:
Remove the following packages:
1) openssh-server
Accept this solution? [Y/n/q/?] ^C
But it didn't work out as expected:
# aptitude -P -o 'Aptitude::ProblemResolver::Hints=reject openssh-server :UNINST' full-upgrade '~U' openssh-client+ openssh-server:
The following packages will be REMOVED:
libbsd0{u} libedit2{u} openssh-client{u}
0 packages upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 2665 kB will be freed.
The following packages have unmet dependencies:
openssh-server : Depends: openssh-client (= 1:6.0p1-3) but it is not going to be installed.
The following actions will resolve these dependencies:
Remove the following packages:
1) openssh-server
[ Worst solution for a remote administrated machine. BTDT. ]
Accept this solution? [Y/n/q/?] ^C
root at acromantula-domu1:~# aptitude -P -o 'Aptitude::ProblemResolver::Hints=reject openssh-server :UNINST' full-upgrade '~U' openssh-client+ openssh-server:
The following packages will be REMOVED:
libbsd0{u} libedit2{u} openssh-client{u}
0 packages upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 2665 kB will be freed.
The following packages have unmet dependencies:
openssh-server : Depends: openssh-client (= 1:6.0p1-3) but it is not going to be installed.
The following actions will resolve these dependencies:
Remove the following packages:
1) openssh-server
[ This looks like a bug to me, hence the report. ]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libbsd0 [0.4.2-1 (now, testing)]
2) libedit2 [2.11-20080614-5 (now, testing)]
Upgrade the following packages:
3) openssh-client [1:6.0p1-3 (now) -> 1:6.0p1-4 (testing)]
4) openssh-server [1:6.0p1-3 (now) -> 1:6.0p1-4 (testing)]
[ Would be ok, but is not intended. ]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libbsd0 [0.4.2-1 (now, testing)]
2) libedit2 [2.11-20080614-5 (now, testing)]
3) openssh-client [1:6.0p1-3 (now)]
[ This is what I'm trying to achieve automatically. ]
Accept this solution? [Y/n/q/?] ^C
So despite I've set Aptitude::ProblemResolver::Hints to "reject
openssh-server :UNINST" as documented, aptitude proposes as first
solution to remove openssh-server.
Running just "aptitude -o 'Aptitude::ProblemResolver::Hints=reject" and
then interactively provoking this situation by pressing "+" on
openssh-client (but not on openssh-server) shows the same proposed
resolutions in the TUI.
Interestingly setting Aptitude::ProblemResolver::Remove-Level to maximum
comes closer to the targeted solution:
# aptitude -P -o 'Aptitude::ProblemResolver::Remove-Level=maximum' full-upgrade '~U' openssh-client+ openssh-server:
The following packages will be REMOVED:
libbsd0{u} libedit2{u} openssh-client{u}
0 packages upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 2665 kB will be freed.
The following packages have unmet dependencies:
openssh-server : Depends: openssh-client (= 1:6.0p1-3) but it is not going to be installed.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libbsd0 [0.4.2-1 (now, testing)]
2) libedit2 [2.11-20080614-5 (now, testing)]
Upgrade the following packages:
3) openssh-client [1:6.0p1-3 (now) -> 1:6.0p1-4 (testing)]
4) openssh-server [1:6.0p1-3 (now) -> 1:6.0p1-4 (testing)]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libbsd0 [0.4.2-1 (now, testing)]
2) libedit2 [2.11-20080614-5 (now, testing)]
3) openssh-client [1:6.0p1-3 (now)]
Accept this solution? [Y/n/q/?] ^C
I then tried to set Aptitude::ProblemResolver::Keep-All-Level to
minimum, but that doesn't seem to change the situation despite I would
have expect that this in general would lead to no action at all happen
quite often:
root at acromantula-domu1:~# aptitude -P -o 'Aptitude::ProblemResolver::Remove-Level=maximum' -o 'Aptitude::ProblemResolver::Keep-All-Level=minimum' full-upgrade '~U' openssh-client+ openssh-server:
The following packages will be REMOVED:
libbsd0{u} libedit2{u} openssh-client{u}
0 packages upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 2665 kB will be freed.
The following packages have unmet dependencies:
openssh-server : Depends: openssh-client (= 1:6.0p1-3) but it is not going to be installed.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libbsd0 [0.4.2-1 (now, testing)]
2) libedit2 [2.11-20080614-5 (now, testing)]
Upgrade the following packages:
3) openssh-client [1:6.0p1-3 (now) -> 1:6.0p1-4 (testing)]
4) openssh-server [1:6.0p1-3 (now) -> 1:6.0p1-4 (testing)]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libbsd0 [0.4.2-1 (now, testing)]
2) libedit2 [2.11-20080614-5 (now, testing)]
3) openssh-client [1:6.0p1-3 (now)]
Accept this solution? [Y/n/q/?] ^C
JFTR: It also seems to make no difference if I set these options on the
commandline or in /root/.aptitude/config.
-- System Information:
[Tested in a minimal virtual machine installed with "xen-create-image
--dist wheezy --hostname acromantula-domu1 --lvm vg0 --dhcp
--verbose --pygrub". Report written somewhere else.]
More information about the Aptitude-devel
mailing list