Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3] core/pkg-generic: only save latest package list
Date: Fri, 4 Jan 2019 18:51:50 +0100	[thread overview]
Message-ID: <20190104175150.GD19623@scaer> (raw)
In-Reply-To: <25b04dd9-68de-9f1e-c830-fa6e86cb6d68@green-communications.fr>

Nicolas, All,

On 2019-01-04 16:30 +0100, Nicolas Cavallari spake thusly:
> On 04/01/2019 14:12, Yann E. MORIN wrote:
> > On 2018-05-01 13:28 +0100, John Keeping spake thusly:
> >> When rebuilding a package, simply appending the package's file list to
> >> the global list means that the package list grows for every rebuild, as
> > 
> > Is there a particular issue with those three files growing on rebuild?
> 
> The problem is that not only does this makes the file list grow, it also
> adds loads of incorrect data: when rebuilding a package that was
> compiled early, all files modified since the package was built will be
> included. So the list will include files that have been installed by
> this package and all packages compiled after it. For some core packages,
> this usually means "almost everything".

Sorry, but I don't understand what you mean.

Whether you install or reinstall a package, there is no guarantte on the
order of the other packages it is unrelated to: they may very well be
built before or after the package.

So yes, when you re-install a package, the file list contains all files
installed before it, but they are not assigned to this package, with one
exception: the .la files, which are all assigned to the latest package
installed. And in any case, even if you were not re-installing your
package, but it was the latest to be built, then you'd still have the
issue that the .la files would all be accounted to for your package.

But, two things;
  - this only accounts for .la files in staging, not in target/, and
  - I have already fixed that locally and will send the patch shortly.

Still, I am not usre I understood your problem anyway, so can you
explain in more details, and provide an easy reproducing sequence (based
on the git master)?

> > Compared to the rest of the build tree, those three files have very
> > small sizes in fact, and if they eventually end up big enough to be a
> > substantial part of the build tree, it's most probably time for a clean
> > build from scratch anyway, no?
> 
> Having a big list would not a problem if nobody used the content of this
> file, but some tools scans it and use it to check files. After many
> recompiling, I remember having problems with one tool taking a
> considerable amount of time for each build because of all the duplicates
> in the list. But i don't remember which tool it was.

Are you talking about a tool in Buildroot? Can you try to provide more
details, please? Are you still able to reproduce the slowness on the
current git master?

The only two tools that make use of the packages-file-list.txt are
check-uniq-files (which actually checks that files are not installed by
two or more packages), and support/scripts/size-stats, which graphs a
pie-chart representing the size contribution of each package to the
content of target/. The former is always run at the end of the build, in
the target-finalize step, while the latter is only run on-demand.

They both are written in python, and check-uniq-files is pretty trivial
and lightwieght, and in my experience, very fast.

And in any case, if the list becomes *so big* that reading it takes an
insane amount of time, then probably your host/ staging/ and target/
directories are in a state that is so far from being clean that you
probably should condider a rebuild from scratch at that point.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2019-01-04 17:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-29 13:07 [Buildroot] [PATCH] core/pkg-generic: only save latest package list John Keeping
2018-04-30 16:47 ` Yann E. MORIN
2018-04-30 16:56   ` John Keeping
2018-04-30 19:41     ` Yann E. MORIN
2018-05-01 11:13       ` [Buildroot] [PATCH v2] " John Keeping
2018-05-01 12:04         ` Yann E. MORIN
2018-05-01 12:26           ` John Keeping
2018-05-01 12:28             ` [Buildroot] [PATCH v3] " John Keeping
2018-05-01 12:31               ` Yann E. MORIN
2018-05-01 13:26               ` Thomas Petazzoni
2018-05-01 21:01               ` Peter Korsgaard
2019-01-04 13:12               ` Yann E. MORIN
2019-01-04 15:30                 ` Nicolas Cavallari
2019-01-04 17:51                   ` Yann E. MORIN [this message]
2019-01-05 10:23                     ` Nicolas Cavallari
2019-01-05 16:39                       ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190104175150.GD19623@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox