[Aptitude-devel] Bug#691955: aptitude: Aptitude::ProblemResolver::SolutionCost does not support substraction

Axel Beckert abe at debian.org
Wed Oct 31 16:59:06 UTC 2012

Package: aptitude
Severity: wishlist

Dear Maintainer,

The followingAptitude::ProblemResolver::SolutionCost example is the
aptitude manual:

from removals + 2 * canceled-actions

I tried to weight removals-of-manual higher than other removals and came
up with the following rule:

aptitude -o Aptitude::ProblemResolver::SolutionCost='10 * removals - 9 * removals-of-manual + canceled-actions' remove htop

Since a local metapackage depends on htop, the resolver started its
work. And threw the following errors:

E: Failed to parse the cost settings string: <none>:1:15: Expected EOF, got '-'.
E: Failed to parse the cost settings string: <none>:1:15: Expected EOF, got '-'.

A simpler, yet less practical SolutionCost value with which we were able
to reproduce the issue is:

aptitude -o Aptitude::ProblemResolver::SolutionCost='removals - canceled-actions' remove htop

It would be nice if Aptitude::ProblemResolver::SolutionCost would also
support substraction.

-- Package-specific info:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20121031/597242e4/attachment.ksh>
-------------- next part --------------
*** Please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these lines ***

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (900, 'testing'), (600, 'stable'), (200, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.6-trunk-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages aptitude depends on:
ii  aptitude-common 
ii  libapt-pkg4.12  
ii  libboost-iostreams1.49.0  1.49.0-3.1
ii  libc6                     2.13-36
ii  libcwidget3               0.5.16-3.4
ii  libept1.4.12              1.0.9
ii  libgcc1                   1:4.7.2-4
ii  libncursesw5              5.9-10
ii  libsigc++-2.0-0c2a        2.2.10-0.2
ii  libsqlite3-0    
ii  libstdc++6                4.7.2-4
ii  libtinfo5                 5.9-10
ii  libxapian22               1.2.12-1
ii  zlib1g                    1:1.2.7.dfsg-13

Versions of packages aptitude recommends:
pn  apt-xapian-index                <none>
pn  aptitude-doc-en | aptitude-doc  <none>
ii  libparse-debianchangelog-perl   1.2.0-1
ii  sensible-utils                  0.0.7

Versions of packages aptitude suggests:
pn  debtags  <none>
pn  tasksel  <none>

-- no debconf information

More information about the Aptitude-devel mailing list