Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] scripts/sstate-sysroot-cruft.sh: add simple script to find files in sysroots not tracked by sstate
@ 2012-10-23 22:51 Martin Jansa
  2012-10-24  8:10 ` [PATCHv2] " Martin Jansa
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Jansa @ 2012-10-23 22:51 UTC (permalink / raw)
  To: openembedded-core

* it's not very universal, but works with default oe-core setup and
  shows basic HOW-TO. It can be improved later.

* eglibc-initial should be fixed, but for now better to add that
  work around then to show a lot of false positives

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 scripts/sstate-sysroot-cruft.sh | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100755 scripts/sstate-sysroot-cruft.sh

diff --git a/scripts/sstate-sysroot-cruft.sh b/scripts/sstate-sysroot-cruft.sh
new file mode 100755
index 0000000..ea5fdf8
--- /dev/null
+++ b/scripts/sstate-sysroot-cruft.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Used to find files installed in sysroot which are not tracked by sstate manifest
+# Update BASE
+
+BASE="/OE/oe-core"
+
+OUTPUT=${BASE}/sysroot.cruft.`date "+%s"`
+WHITELIST="\/var\/pseudo\/*[^\/]*$ \/shlibs$ \.pyc$"
+
+mkdir ${OUTPUT}
+find ${BASE}/tmp-eglibc/sstate-control -name \*populate-sysroot -o -name \*package | xargs cat | grep sysroots | \
+  sed 's#tcbootstrapusr#tcbootstrap/usr#g; s#/$##g; s#///*#/#g' | \
+  # work around for missing / in manifest for eglibc-initial, paths ending with / for directories and multiplied // (e.g. paths to native sysroot)
+  sort -u > ${OUTPUT}/sstate-control.master.list # -u because some directories are listed for more recipes
+find ${BASE}/tmp-eglibc/sysroots/ | \
+  sort > ${OUTPUT}/sstate-control.sysroot.list
+
+diff ${OUTPUT}/sstate-control.master.list ${OUTPUT}/sstate-control.sysroot.list > ${OUTPUT}/sstate-control.diff.all
+
+cp ${OUTPUT}/sstate-control.diff.all ${OUTPUT}/sstate-control.diff
+for item in ${WHITELIST}; do 
+  sed -i "/${item}/d" ${OUTPUT}/sstate-control.diff;
+done
+
+echo "Following files are installed in sysroot, but not tracked by sstate"
+cat ${OUTPUT}/sstate-control.diff
-- 
1.7.12.4




^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-11-15 17:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-23 22:51 [PATCH] scripts/sstate-sysroot-cruft.sh: add simple script to find files in sysroots not tracked by sstate Martin Jansa
2012-10-24  8:10 ` [PATCHv2] " Martin Jansa
2012-10-24 11:15   ` [PATCHv3] " Martin Jansa
2012-11-15  7:30     ` [PATCHv4] " Martin Jansa
2012-11-15 15:25       ` Chris Larson
2012-11-15 16:19         ` Martin Jansa
2012-11-15 16:27           ` Chris Larson
2012-11-15 17:09             ` Martin Jansa
2012-11-15 16:49           ` Paul Eggleton
2012-11-15 17:03             ` Martin Jansa
2012-11-15 16:34       ` [PATCHv5] " Martin Jansa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox