From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv5 1/4] pkg-generic: add step_pkg_size global instrumentation hook
Date: Wed, 9 Sep 2015 15:46:17 +0200 [thread overview]
Message-ID: <20150909154617.4c91d847@free-electrons.com> (raw)
In-Reply-To: <55F02FEC.7080703@imgtec.com>
Dear Vicente Olivert Riera,
On Wed, 9 Sep 2015 14:11:08 +0100, Vicente Olivert Riera wrote:
> > +# This hook will be called before the target installation of a
> > +# package. We store in a file named .br_filelist_before the list of
> > +# files currently installed in the target. Note that the MD5 is also
> > +# stored, in order to identify if the files are overwritten.
> > +define step_pkg_size_start
> > + (cd $(TARGET_DIR) ; find . -type f -print0 | xargs -0 md5sum) | sort > \
>
> why only "-type f"? Packages can also install other type of files such
> as links, for instance. Don't you want to track them as well?
It doesn't make sense to "md5sum" a symbolic link: what you will md5 is
the target of the link, i.e another file of the file system that is
already taken into account by the size statistics mechanism.
We are really only interested in calculating the size of the
filesystem, so the only thing of interest are real file. We assume that
the size of things like device files, directories or symbolic links is
negligible and not relevant for our analysis.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-09-09 13:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 21:15 [Buildroot] [PATCHv5 0/4] Generate package size statistics Thomas Petazzoni
2015-09-02 21:15 ` [Buildroot] [PATCHv5 1/4] pkg-generic: add step_pkg_size global instrumentation hook Thomas Petazzoni
2015-09-03 10:25 ` Yann E. MORIN
2015-09-09 13:11 ` Vicente Olivert Riera
2015-09-09 13:46 ` Thomas Petazzoni [this message]
2015-09-09 13:50 ` Vicente Olivert Riera
2015-09-09 14:10 ` Thomas Petazzoni
2015-09-02 21:15 ` [Buildroot] [PATCHv5 2/4] support/scripts: add size-stats script Thomas Petazzoni
2015-09-03 10:27 ` Yann E. MORIN
2015-09-02 21:15 ` [Buildroot] [PATCHv5 3/4] Makefile: implement a size-stats target Thomas Petazzoni
2015-09-03 10:29 ` Yann E. MORIN
2015-09-03 12:21 ` Thomas Petazzoni
2015-09-03 12:36 ` Yann E. MORIN
2015-09-02 21:15 ` [Buildroot] [PATCHv5 4/4] docs/manual: add section about size graphing Thomas Petazzoni
2015-09-03 10:37 ` Yann E. MORIN
2015-09-03 10:43 ` Yann E. MORIN
2015-09-15 2:54 ` Ryan Barnett
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=20150909154617.4c91d847@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--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