[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Aptitude-devel] aptitude ~A question



Hi Steve,

steve wrote:
> I'm trying to understand why
> 
> aptitude search ~Ajessie~i | wc -l
> 240
> 
> is different from
> 
> aptitude search ~Astable~i | wc -l
> 3243
> 
> but is the same as
> 
> aptitude search ~Ajessie-backports~i | wc -l
> 240

The main reason is that ~A does (as most of aptitude's patterns)
substring matching, e.g. the jessie-backports repository has the
following meta data (from the output of "apt-cache policy" without further
parameters):

  release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports,c=main

~A matches the "a=" value. And since it does substring matching,
~Ajessie also matches a=jessie-backports.

The value of "a=" again comes from the Archive field in a repository's
Release file, e.g.
http://ftp.ch.debian.org/debian/dists/jessie-backports/main/binary-amd64/Release

Then again the normal jessie/stable repository has the following meta
data:

  release v=8.6,o=Debian,a=stable,n=jessie,l=Debian,c=main

(According Release file:
http://ftp.ch.debian.org/debian/dists/stable/main/binary-amd64/Release)

You see that there is a=stable while "jessie" only is in the "n="
value(*), so ~Ajessie does not match these packages.

(*) which is not even mentioned in the Release file listed above and
    hence probably comes from the sources.list -- not sure here, but
    the APT developers can likely explain that detail.

I don't know if that inconsistency between stable and jessie-backports
is on purpose (and if so, why) or by accident. Cc'ing the
debian-backports mailing list for that part. There someone can
probably explain that.

> This is something difficult to interpret and that's the reason I'm
> raising this question on aptitude-devel@ (this subject is currently
> being discussed on debian-user@ without any success).

So I'm Cc'ing debian-user too.

> Reading the docs and asking search engines hasn't given much
> unfortunately. May I ask to explain or point me to a relevant
> ressource?

Short summary of what IMHO is the relevant facts here:

* aptitude's ~A pattern matches substrings of the Archive value in the
  Release file.
* Jessie's APT repositories have "stable" and not "jessie" in the
  Archive value in the Release file.

The according documentation is at
https://aptitude.alioth.debian.org/doc/en/ch02s04s05.html#searchArchive
but I must admit, it's not perfect as it does not help with your question.

Hope this helps.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE


Reply to: