Package: aptitude
Version: 0.4.11.11-1+b2
Followup-For: Bug #509974

Trent W. Buck wrote:
> As package names are always lowercase, perhaps aptitude should
> lowercase requested package names?         

AOL.  Aptitude's behaviour with strings that it doesn't immediately
recognise as package names is a bit bizarre. 

Let's imagine I want to install the amanda backup server.  If I ask
to "aptitude install amanda", this runs into the problem that
there's no such binary package name.  As a fallback aptitude tries
to find packages I might have meant by searching for the string
"amanda" in package descriptions, but as it happens this also
fails:

 root:~# aptitude install amanda
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 Reading extended state information
 Initializing package states... Done
 No candidate version found for amanda
 No candidate version found for amanda
 No packages will be installed, upgraded, or removed.
 [...]

I have no idea why it seems to happen twice, there.  I might have
guessed that one of these attempts might have been a search on just
package names... except that it didn't find "amanda-server".  Or
maybe I would guess that the second search included source
packages... except that it misses the one named "amanda" (as in
"aptitude build-dep amanda", which works).  I don't see anything
about this behaviour in aptitude-doc. 

If I ask to install Amanda, on the other hand, the search
successfully matches some packages that happen to have that exact
capitalised string in their descriptions:

 root:~# aptitude install Amanda
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 Reading extended state information
 Initializing package states... Done
 Couldn't find any package matching "Amanda".  However, the following
 packages contain "Amanda" in their description:
   amanda-server chiark-backup mtx amanda-client
 Couldn't find any package matching "Amanda".  However, the following
 packages contain "Amanda" in their description:
   amanda-server chiark-backup mtx amanda-client
 No packages will be installed, upgraded, or removed.
 [...]

In the case of amanda, searching case-sensitively for the
capitalised name finds the packages I was looking for, but it isn't
much help with, for instance, apache2: 

 root:~# aptitude install Apache2
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 Reading extended state information      
 Initializing package states... Done
 Couldn't find any package matching "Apache2".  However, the following
 packages contain "Apache2" in their description:
   libapache2-mod-auth-sys-group libapache2-mod-rpaf 
   libapache2-mod-proxy-html libapache2-mod-ruby 
   libapache2-authcassimple-perl libapache2-mod-ocamlnet 
   libapache2-reload-perl libapache2-mod-perl2-dev
   libapache2-mod-auth-pgsql 
   libapache2-mod-perl2-doc libapache2-authenntlm-perl 
   libapache2-mod-auth-openid libapache-ruby1.8
   libapache2-mod-auth-plain 
   libembperl-perl libapache2-mod-suphp libapache2-mod-encoding 
   libapache2-mod-defensible libapache2-mod-speedycgi
   libapache2-mod-perl2 
   libapache2-mod-auth-pam libapache2-mod-gnutls libapache2-mod-lisp 
   libapache2-mod-mime-xattr libfile-mmagic-xs-perl 
 Couldn't find any package matching "Apache2".  However, the following
 packages contain "Apache2" in their description:
   libapache2-mod-auth-sys-group libapache2-mod-rpaf 
   [...etc, as above...]
   libapache2-mod-mime-xattr libfile-mmagic-xs-perl 
 No packages will be installed, upgraded, or removed.
 [...]

(Notice that apache2 itself isn't on that list.)

Wouldn't it make more sense to replace one of those package
description searches with a "normalised" name lookup and/or
case-insensitive search?

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.33.custom
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages aptitude depends on:
ii  apt [libapt-pkg-libc6.9 0.7.25.3         Advanced front-end for dpkg
ii  libc6                   2.10.2-6         Embedded GNU C Library: Shared lib
ii  libcwidget3             0.5.16-3         high-level terminal interface libr
ii  libept0                 0.5.30           High-level library for managing De
ii  libgcc1                 1:4.4.2-9        GCC support library
ii  libncursesw5            5.7+20090803-2   shared libraries for terminal hand
ii  libsigc++-2.0-0c2a      2.2.4.2-1        type-safe Signal Framework for C++
ii  libstdc++6              4.4.2-9          The GNU Standard C++ Library v3
ii  libxapian15             1.0.18-1         Search engine library
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages aptitude recommends:
ii  aptitude-doc-en [aptitude-do 0.4.11.11-1 English manual for aptitude, a ter
ii  libparse-debianchangelog-per 1.1.1-2     parse Debian changelogs and output

Versions of packages aptitude suggests:
ii  debtags                       1.7.9+b2   Enables support for package tags
pn  tasksel                       <none>     (no description available)

-- no debconf information
-- 
JBR
Ankh kak! (Ancient Egyptian blessing)



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to