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
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.
I think you meant All*Versions*, not Names.
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…
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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 113:47:37 |
Calls: | 6,854 |
Files: | 12,355 |
Messages: | 5,416,595 |