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

Bug#913913: apt-cache policy does not display all (security and updates) APT repos in buster



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.

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.

Cheers!

On Fri, 16 Nov 2018, Yaroslav Halchenko wrote:

> Even though there are 3 APT sources available, apt-cache policy in buster
> reports only a single one ignoring security and updates:

> 	$> docker run -it --rm debian:buster 
> 	Unable to find image 'debian:buster' locally
> 	buster: Pulling from library/debian
> 	bac5159b230a: Pull complete 
> 	Digest: sha256:8d601936efd739539811324e431a559782740a96b0e2896a8740245e1aad8db2
> ...

-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        


Reply to: