Bug#913913: apt-cache policy does not display all (security and updates) APT repos in buster
On Fri, Nov 16, 2018 at 04:26:24PM -0500, Yaroslav Halchenko wrote:
> and I guess I can demystify right away what is going on (although I
> didn't try to reconfirm by rebuilding or debugging):
>
> https://salsa.debian.org/apt-team/apt/blob/master/apt-private/private-show.cc#L488
>
> if (F.Flagged(pkgCache::Flag::NoPackages))
> continue;
>
> so no apt entries are displayed if they provide no packages ATM.
>
> Although I could see how it is useful generally, for our purpose it is
> somewhat of a blow, since we are trying to use apt-cache policy output
> to decide what APT sources in general are configured. and since we are
> rolling back in time to use snapshots, they might have had packages at
> that point in time, thus we better adjust them as well.
I don't know if it helps, but you might want to look at apt-get indextargets?
>
> Also documentation has no hint on such a "feature":
>
> policy [pkg...]
> policy is meant to help debug issues relating to the preferences file. With no
> arguments it will print out the priorities of each source. Otherwise it prints
> out detailed information about the priority selection of the named package.
>
> so "each source", but not each source is printed out!
>
> I wish this "feature" of skipping APT sources without packages was somehow
> optional/configurable. Otherwise, at least documentation should mention such
> feature.
I don't necessarily see it as skipping sources. I don't think the Packages files
for these sources exist in the cache (as none are downloaded), hence they won't be
shown.
Clearly source is not a particularly helpful term, as it's a bit vague (it's not
a sources.list entry, after all). I think it should probably say "non-empty Packages
index" or something.
--
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer i speak de, en
Reply to: