RFC Generating a graph of the size installed by each package
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest0 of 4 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 4 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Buildroot] [RFCv1 0/4] Generating a graph of the size installed by each package
Dear Will Wagner,
Quoted 10 lines · Will Wagner
Quoted 6 lines
The implementation consists in adding a global instrumentation hook that registers which files are installed by each package. A limitation of the current implementation is that when a file is installed by a package A and then overriden by package B, the mechanism will assume the file was installed by package A. Suggestions to welcome on how to solve this in a reasonably simple way.
Can you not record the timestamp the first time you see the file and see if it has changed at the end. I appreciate a bash script to do this is going to be pretty hard.
Depends on what you call "at the end". The problem is that between the end of the install-target step of a given package, and the end of the entire build of the system, most of the files in $(TARGET_DIR) are modified due to stripping. Therefore, their timestamp changes.
The only thing I could think of would be based on SHA1: in the global instrumentation hook, instead of just doing a "find" on all files in $(TARGET_DIR) and then diff the result before/after the installation, we include the SHA1. Therefore, the diff would indicate when a file has changed, so we would be able to detect that. However, this would mean that a file will be mentioned in two .filelist files, and since the Python script has no idea in which order the packages were built, it does not know which of the two packages won for the installation of the given file. Could be based on the timestamp of the .filelist file, though. Starts to be a bit tricky, as you can see :)
Thanks for your feedback!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com