Your message dated Fri, 8 Mar 2013 23:36:44 +0800
with message-id 
<CAN3veRc+WNhCxRHMn5dBKu27oKcDyjwrQ=g0osu_alzksud...@mail.gmail.com>
and subject line Re: Bug#702561: aptitude: resolver hints 
(Aptitude::ProblemResolver::Hints=reject openssh-server :UNINST) being ignored
has caused the Debian Bug report #702561,
regarding aptitude: resolver hints (Aptitude::ProblemResolver::Hints=reject 
openssh-server :UNINST) being ignored
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
702561: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702561
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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@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@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.]

--- End Message ---
--- Begin Message ---
On 8 March 2013 19:58, Axel Beckert <[email protected]> wrote:
> 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 documentation (both _Configuring resolver hints_ and
_Configuration file reference_) defines this option as a _group_.  It
is the group members whose values are effective, not the value of the
group itself.  The correct syntax is:

 -o 'Aptitude::ProblemResolver::Hints::=reject openssh-server :UNINST'

Regards

--- End Message ---
_______________________________________________
Aptitude-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/aptitude-devel

Reply via email to