Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #210457 > unrolled thread
| Started by | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| First post | 2019-06-28 15:10 +0200 |
| Last post | 2019-06-28 16:10 +0200 |
| Articles | 10 — 6 participants |
Back to article view | Back to linux.debian.user
Function similar to {apt-cache recurse ...}? Richard Owlett <rowlett@cloud85.net> - 2019-06-28 15:10 +0200
Re: Function similar to {apt-cache recurse ...}? <tomas@tuxteam.de> - 2019-06-28 16:00 +0200
Re: Function similar to {apt-cache recurse ...}? Richard Owlett <rowlett@cloud85.net> - 2019-06-28 16:30 +0200
Re: Function similar to {apt-cache recurse ...}? Jonas Smedegaard <jonas@jones.dk> - 2019-06-28 16:40 +0200
Re: Function similar to {apt-cache recurse ...}? Curt <curty@free.fr> - 2019-06-28 17:30 +0200
Re: Function similar to {apt-cache recurse ...}? Gene Heskett <gheskett@shentel.net> - 2019-06-28 18:20 +0200
Re: Function similar to {apt-cache recurse ...}? David Wright <deblis@lionunicorn.co.uk> - 2019-07-01 03:50 +0200
Re: Function similar to {apt-cache recurse ...}? David Wright <deblis@lionunicorn.co.uk> - 2019-06-28 16:00 +0200
Re: Function similar to {apt-cache recurse ...}? Richard Owlett <rowlett@cloud85.net> - 2019-06-28 16:00 +0200
Re: Function similar to {apt-cache recurse ...}? <tomas@tuxteam.de> - 2019-06-28 16:10 +0200
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2019-06-28 15:10 +0200 |
| Subject | Function similar to {apt-cache recurse ...}? |
| Message-ID | <ydYNz-460-3@gated-at.bofh.it> |
"apt-get install" will report the size of the new files to be installed
when it asks for confirmation.
I'm looking for something similar which will base its calculation *ONLY*
on the contents of /var/lib/apt/lists/ {ignoring what is already on the
current system}.
[toc] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2019-06-28 16:00 +0200 |
| Message-ID | <ydZzY-4mr-3@gated-at.bofh.it> |
| In reply to | #210457 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Jun 28, 2019 at 08:50:02AM -0500, David Wright wrote:
> On Fri 28 Jun 2019 at 08:04:43 (-0500), Richard Owlett wrote:
> > "apt-get install" will report the size of the new files to be
> > installed when it asks for confirmation.
> >
> > I'm looking for something similar which will base its calculation
> > *ONLY* on the contents of /var/lib/apt/lists/ {ignoring what is
> > already on the current system}.
>
> I thought it already did; I posted this here six days ago:
>
> Calculating upgrade... Done
> The following packages will be upgraded:
> … … … …
> 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Need to get 52.5 MB/52.5 MB of archives.
> After this operation, 74.8 kB of additional disk space will be used.
> ↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑↑
> Do you want to continue? [Y/n]
>
> If that's not what you mean, ask your question again avoiding words
> like "similar" and "based on".
I read the OP's question as "the total installed size including
dependencies" -- assuming none of those dependencies has been
installed before (ex nihilo, so to speak).
While that question sounds reasonable, it is not -- do you count
the base system, for exampla? That means "installed size" is
/always/ relative to some "base installation".
But perhaps my interpretation is wrong.
Cheers
-- tomás
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2019-06-28 16:30 +0200 |
| Message-ID | <ye030-4Lb-3@gated-at.bofh.it> |
| In reply to | #210459 |
On 06/28/2019 08:58 AM, tomas@tuxteam.de wrote:
> On Fri, Jun 28, 2019 at 08:50:02AM -0500, David Wright wrote:
>> On Fri 28 Jun 2019 at 08:04:43 (-0500), Richard Owlett wrote:
>>> "apt-get install" will report the size of the new files to be
>>> installed when it asks for confirmation.
>>>
>>> I'm looking for something similar which will base its calculation
>>> *ONLY* on the contents of /var/lib/apt/lists/ {ignoring what is
>>> already on the current system}.
>>
>> I thought it already did; I posted this here six days ago:
>>
>> Calculating upgrade... Done
>> The following packages will be upgraded:
>> … … … …
>> 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>> Need to get 52.5 MB/52.5 MB of archives.
>> After this operation, 74.8 kB of additional disk space will be used.
>> ↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑↑
>> Do you want to continue? [Y/n]
>>
>> If that's not what you mean, ask your question again avoiding words
>> like "similar" and "based on".
>
> I read the OP's question as "the total installed size including
> dependencies" -- assuming none of those dependencies has been
> installed before (ex nihilo, so to speak).
Explicitly *YES*!
It's nice to have someone actually read what I write ;)
>
> While that question sounds reasonable, it is not -- do you count
> the base system, for exampla? That means "installed size" is
> /always/ relative to some "base installation".
>
> But perhaps my interpretation is wrong.
No. Perfectly correct.
I'm comparing possible approaches to a problem.
The "base install" is only loosely defined at this time.
>
> Cheers
> -- tomás
>
[toc] | [prev] | [next] | [standalone]
| From | Jonas Smedegaard <jonas@jones.dk> |
|---|---|
| Date | 2019-06-28 16:40 +0200 |
| Message-ID | <ye0cF-4Oo-1@gated-at.bofh.it> |
| In reply to | #210463 |
[Multipart message — attachments visible in raw view] — view raw
Quoting Richard Owlett (2019-06-28 16:21:31)
> On 06/28/2019 08:58 AM, tomas@tuxteam.de wrote:
> > On Fri, Jun 28, 2019 at 08:50:02AM -0500, David Wright wrote:
> >> On Fri 28 Jun 2019 at 08:04:43 (-0500), Richard Owlett wrote:
> >>> "apt-get install" will report the size of the new files to be
> >>> installed when it asks for confirmation.
> >>>
> >>> I'm looking for something similar which will base its calculation
> >>> *ONLY* on the contents of /var/lib/apt/lists/ {ignoring what is
> >>> already on the current system}.
> >>
> >> I thought it already did; I posted this here six days ago:
> >>
> >> Calculating upgrade... Done
> >> The following packages will be upgraded:
> >> … … … …
> >> 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> >> Need to get 52.5 MB/52.5 MB of archives.
> >> After this operation, 74.8 kB of additional disk space will be used.
> >> ↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑↑
> >> Do you want to continue? [Y/n]
> >>
> >> If that's not what you mean, ask your question again avoiding words
> >> like "similar" and "based on".
> >
> > I read the OP's question as "the total installed size including
> > dependencies" -- assuming none of those dependencies has been
> > installed before (ex nihilo, so to speak).
>
> Explicitly *YES*!
> It's nice to have someone actually read what I write ;)
Reading is not enough - requires understanding too.
When you add insult, you discourage further attempts.
- Jonas
--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/
[x] quote me freely [ ] ask before reusing [ ] keep private
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2019-06-28 17:30 +0200 |
| Message-ID | <ye0Z4-5kR-1@gated-at.bofh.it> |
| In reply to | #210463 |
On 2019-06-28, Richard Owlett <rowlett@cloud85.net> wrote: >> >> I read the OP's question as "the total installed size including >> dependencies" -- assuming none of those dependencies has been >> installed before (ex nihilo, so to speak). > > Explicitly *YES*! > It's nice to have someone actually read what I write ;) > Except it's kind of turtles all the way down, isn't it?
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2019-06-28 18:20 +0200 |
| Message-ID | <ye1Lr-5Qa-7@gated-at.bofh.it> |
| In reply to | #210466 |
On Friday 28 June 2019 11:21:45 Curt wrote: > On 2019-06-28, Richard Owlett <rowlett@cloud85.net> wrote: > >> I read the OP's question as "the total installed size including > >> dependencies" -- assuming none of those dependencies has been > >> installed before (ex nihilo, so to speak). > > > > Explicitly *YES*! > > It's nice to have someone actually read what I write ;) > > Except it's kind of turtles all the way down, isn't it? As far as we can see. After some hundreds of feet its too dark to see. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2019-07-01 03:50 +0200 |
| Message-ID | <yeTC9-5Ut-3@gated-at.bofh.it> |
| In reply to | #210463 |
On Fri 28 Jun 2019 at 09:21:31 (-0500), Richard Owlett wrote:
> On 06/28/2019 08:58 AM, tomas@tuxteam.de wrote:
> > On Fri, Jun 28, 2019 at 08:50:02AM -0500, David Wright wrote:
> > > On Fri 28 Jun 2019 at 08:04:43 (-0500), Richard Owlett wrote:
> > > > "apt-get install" will report the size of the new files to be
> > > > installed when it asks for confirmation.
> > > >
> > > > I'm looking for something similar which will base its calculation
> > > > *ONLY* on the contents of /var/lib/apt/lists/ {ignoring what is
> > > > already on the current system}.
> > >
> > > I thought it already did; I posted this here six days ago:
> > >
> > > Calculating upgrade... Done
> > > The following packages will be upgraded:
> > > … … … …
> > > 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> > > Need to get 52.5 MB/52.5 MB of archives.
> > > After this operation, 74.8 kB of additional disk space will be used.
> > > ↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑↑
> > > Do you want to continue? [Y/n]
> > >
> > > If that's not what you mean, ask your question again avoiding words
> > > like "similar" and "based on".
> >
> > I read the OP's question as "the total installed size including
> > dependencies" -- assuming none of those dependencies has been
> > installed before (ex nihilo, so to speak).
>
> Explicitly *YES*!
> It's nice to have someone actually read what I write ;)
>
> >
> > While that question sounds reasonable, it is not -- do you count
> > the base system, for exampla? That means "installed size" is
> > /always/ relative to some "base installation".
> >
> > But perhaps my interpretation is wrong.
>
> No. Perfectly correct.
In which case, part of that interpretation says: "While that question
sounds reasonable, it is not". And that's why I asked you to
reformulate your question if my answer was unsatisfactory for you,
instead of just shouting about it.
Once again, you have posed an ambiguous question that is open to
several interpretations, and you don't like any responses that aren't
in agreement with whatever thought processes are going on inside your
head.
> I'm comparing possible approaches to a problem.
Which approaches are you comparing? Why don't you expound them here so
that people can weigh the pros and cons, instead of expecting them to
second-guess what you might be thinking of.
> The "base install" is only loosely defined at this time.
You didn't define it, loosely or otherwise, or mention it at all.
But if you really mean to consider just the information in
/var/lib/apt/lists, without reference to any system, current or
otherwise, then the answer is probably to use your facility with
tcl to write a script.
You might start by building hash table A of Installed-Size and
Depends&Pre-Depends, indexed by Package. I don't recall whether there
are existing tools that parse /var/lib/apt/lists files for you.
Then, given any packages to be installed, you can recursively follow
their dependencies using A, building hash table B indexed by the extra
packages needing to be installed. (The values in table B are
irrelevant.)
Whenever you reach a package that already has an index entry in B,
stop following that branch because it's already been done (and it
avoids any circularities).
Finally, when you've run out of branches to follow, sum all the
Installed-Size values in A for the packages you've indexed in B.
Repeat: if that's not what you mean, ask your question again avoiding
words like "similar" and "based on". And quit shouting.
Cheers,
David.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2019-06-28 16:00 +0200 |
| Message-ID | <ydZzY-4mr-5@gated-at.bofh.it> |
| In reply to | #210457 |
On Fri 28 Jun 2019 at 08:04:43 (-0500), Richard Owlett wrote:
> "apt-get install" will report the size of the new files to be
> installed when it asks for confirmation.
>
> I'm looking for something similar which will base its calculation
> *ONLY* on the contents of /var/lib/apt/lists/ {ignoring what is
> already on the current system}.
I thought it already did; I posted this here six days ago:
Calculating upgrade... Done
The following packages will be upgraded:
… … … …
9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 52.5 MB/52.5 MB of archives.
After this operation, 74.8 kB of additional disk space will be used.
↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑↑
Do you want to continue? [Y/n]
If that's not what you mean, ask your question again avoiding words
like "similar" and "based on".
Cheers,
David.
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2019-06-28 16:00 +0200 |
| Message-ID | <ydZzY-4mr-19@gated-at.bofh.it> |
| In reply to | #210460 |
On 06/28/2019 08:50 AM, David Wright wrote:
> On Fri 28 Jun 2019 at 08:04:43 (-0500), Richard Owlett wrote:
>> "apt-get install" will report the size of the new files to be
>> installed when it asks for confirmation.
>>
>> I'm looking for something similar which will base its calculation
>> *ONLY* on the contents of /var/lib/apt/lists/ {ignoring what is
>> already on the current system}.
>
> I thought it already did; I posted this here six days ago:
>
> Calculating upgrade... Done
> The following packages will be upgraded:
> … … … …
> 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Need to get 52.5 MB/52.5 MB of archives.
> After this operation, 74.8 kB of additional disk space will be used.
> ↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑↑
*TILT ERR*
READ my second sentence!
ESPECIALLY from "{" to "}".
> Do you want to continue? [Y/n]
>
> If that's not what you mean, ask your question again avoiding words
> like "similar" and "based on".
>
> Cheers,
> David.
>
>
>
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2019-06-28 16:10 +0200 |
| Message-ID | <ydZJD-4F0-1@gated-at.bofh.it> |
| In reply to | #210461 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Jun 28, 2019 at 08:57:24AM -0500, Richard Owlett wrote:
[...]
> READ my second sentence!
> ESPECIALLY from "{" to "}".
Cool down, Richard, and accept that your questions may be
difficult for others to understand (although their meaning
always seem crystal clear for /you/).
Communication is like that, and I, for one, am always grateful
towards my co-humans, who put a non-negligible effort into
making sense of my babblings.
Cheers
-- t
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web