On Thu, May 02, 2024 at 12:40:30PM +0200, Manny wrote:
> Note that “-o APT::Cache::AllNames=false” is used in vain (it has no
> effect but at least it does not interfere either). The work of

I think you meant All*Versions*, not Names. The later is documented to
effect `pkgnames` only. In some way, AllVersions is documented to effect
`show`, but much less specific by "full records" – a record is what show
displays and policy doesn't, but yeah, not really discoverable.


> It would be nice if I could also get a total size on any files to be
> fetched. My knee-jerk thought would be to filter on all packages that
> are not sourced from file:/local/filesystem, run apt-cache on that
> subset to get full URLs, then do something like:
> 
>   apt-cache show "$pkg" | awk '/^Size/{print $2}'
> 
> Anyway, the low-effort fix would be to at least update the man page to
> state the narrow availability of --no-all-versions. Though it would be
> useful if it worked for policy.
> 
> In light of my use case, you could also say it’s already hacking
> territory that apt-cache was needed at all. In principle, aptitude’s
> installer output of how much data will be fetched should give a
> breakdown of data volume to be fetched from each source location,
> perhaps when run in a verbose mode.

fwiw: I don't know about aptitude and if you think it should get some
feature I suppose you should report it there, but for apt(-get) I have
to note that both display "download size" as the size of all *.deb
files to be downloaded from non-local (that mostly means non-file:/)
sources…

They do this mostly to check if the free disk space is large enough to
hold the debs to download (while file:/ are used from there they are),
but that is close at least to your knee-jerk thought.

Not sure about the later "each source location"… that can turn out to be
a lot of details for not that much gain: a typical Debian stable has
'normal', 'updates' and 'security'. You could add 'proposed' and e.g.
'backports' and a random set of 3rd parties like the typical Ubuntu user
with seemingly 42+ PPAs added. That is 3+X counters useless even to you
as you were just interested in the data coming from your local mirror
vs. others. And that would assume that all mirrors are complete and
available, no retries, no fallbacks, no redirects.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature

Reply via email to