[Aptitude-devel] Bug#685731: aptitude: " ⁓ install PATTERN" without ~r installs package for all architectures

Daniel Hartwig mandyke at gmail.com
Fri Aug 24 16:50:59 UTC 2012


On 24 August 2012 10:11, Daniel Hartwig <mandyke at gmail.com> wrote:
> Running aptitude install (or remove, etc.) with pattern arguments
> selects all architectures and will typically result in conflicts.  In
> contrast, apt-get only selects a single architecture (the most
> preferred) for each package.

> The default command line behaviour could be adjusted, such that
> pattern arguments behaive similar to regex arguments with apt-get.

This will be resolved by having search patterns on the command line
match package groups, rather than packages.  The action will then
be effective on only the preferred (usually native) package from
each group.  If a different architecture is desired, then it must
be specified with an arch tag much like versions have to be
specified at the moment:

--

$ apt-cache policy aptitude
aptitude:
  Installed: 0.6.8-1
  Candidate: 0.6.8-1
  Version table:
     0.6.9.1-1 0
          1 http://ftp.iinet.net.au/debian/debian/ experimental/main
i386 Packages
 *** 0.6.8-1 0
        500 http://ftp.iinet.net.au/debian/debian/ sid/main i386 Packages
        100 /var/lib/dpkg/status
$ aptitude install -s '?narrow(?version(0.6.9),?exact-name(aptitude))'
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 545 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Would download/install/remove packages.
$ aptitude install -s
'?narrow(?version(0.6.9),?exact-name(aptitude))/experimental'
The following packages will be REMOVED:
  aptitude-common{u}
The following packages will be upgraded:
  aptitude{b}
1 packages upgraded, 0 newly installed, 1 to remove and 545 not upgraded.
Need to get 1,915 kB of archives. After unpacking 9,411 kB will be freed.
The following packages have unmet dependencies:
  C-c C-c
--

Install all packages from a group with this syntax is:

 # aptitude install '?name(^libc-bin$):*'

There are two steps involved: selecting the groups and selecting the
architecture.  The order of these is significant, if the architecture
is selected first, then the search only takes place against one
package from each group.  The results will be different depending on
various factors.

Select groups, then architecture for the initial implementation.
This is simple, and will suffice for sensible multi-arch handling of
arguments similar to apt-get.  This means that to remove, say, a set
of foreign-arch emacs packages:

 # aptitude remove '?name(^emacs):mipsel'

because '?name(^emacs)' will not select them.

Comments?



More information about the Aptitude-devel mailing list