Re: [Aptitude-devel] aptitude ~A question
> I'm trying to understand why
> aptitude search ~Ajessie~i | wc -l
> is different from
> aptitude search ~Astable~i | wc -l
> but is the same as
> aptitude search ~Ajessie-backports~i | wc -l
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
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.
Then again the normal jessie/stable repository has the following meta
(According Release file:
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
Short summary of what IMHO is the relevant facts here:
* aptitude's ~A pattern matches substrings of the Archive value in the
* Jessie's APT repositories have "stable" and not "jessie" in the
Archive value in the Release file.
The according documentation is at
but I must admit, it's not perfect as it does not help with your question.
Hope this helps.
,''`. | Axel Beckert <firstname.lastname@example.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