sstate-cache-management.sh: fix remove duplicate failed when multiple archs
cover sstate-cache-management.sh: fix remove duplicate failed when multiple archs
The following changes since commit 7d22ef28e64de06b6238d0ef9b664c0bee6efa46:
bitbake: Revert "fetch2: Adapt encode/decode url to use URI class" (2013-02-19 23:07:23 -0800)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/fix-sstate-mngt-sh
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-sstate-mngt-sh
Hongxu Jia (3):
sstate-cache-management.sh: fix remove duplicate failed when multiple
archs
sstate-cache-management.sh: don't hardcode available sstate_suffixes sstate-cache-management.sh:fix the incorrect usage of option `-d'
scripts/sstate-cache-management.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.10.4
PATCH 1/3 sstate-cache-management.sh: fix remove duplicate failed when multiple archs
The implementation of `--remove-duplicated' has been modified by the commit:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0740f82aea92da0195524e37c372f9981e7f5e6d
In above commit, sstate cache files with multiple archs are not considered duplicate and don't need to be removed as duplicated any more.
Update the description of `--remove-duplicated' in usage to keep consistent with implementation.
[YOCTO #3635]
--- scripts/sstate-cache-management.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
scripts/sstate-cache-management.sh +3 -1
@@ -47,7 +47,9 @@ Options: -d, --remove-duplicated Remove the duplicated sstate cache files of one package, only - the newest one will be kept. + the newest one will be kept. The duplicated sstate cache files + of one package must have the same arch, which means sstate cache + files with multiple archs are not considered duplicate. Conflicts with --stamps-dir.
Signature · 1 line
1.7.10.4
PATCH 2/3 sstate-cache-management.sh: don't hardcode available sstate_suffixes
In reply to Hongxu JiaDon't hardcode available sstate_suffixes(it misses `packagedata'), find them dynamically in $sstate_list.
[YOCTO #3635]
--- scripts/sstate-cache-management.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
scripts/sstate-cache-management.sh +7 -2
@@ -185,11 +185,16 @@ remove_duplicated () { | sed -e 's/-/_/g' -e 's/ /\n/g' | sort -u) echo "Done" - sstate_suffixes="deploy-rpm deploy-ipk deploy-deb deploy package populate-lic populate-sysroot" - # Save all the sstate files in a file sstate_list=`mktemp` || exit 1 find $cache_dir -name 'sstate-*.tgz' >$sstate_list + + echo -n "Figuring out the suffixes in the sstate cache dir ... " + sstate_suffixes="`sed 's/.*_\([^_]*\)\.tgz$/\1/g' $sstate_list | sort -u`" + echo "Done" + echo "The following suffixes have been found in the cache dir:" + echo $sstate_suffixes + echo -n "Figuring out the archs in the sstate cache dir ... " for arch in $all_archs; do grep -q "\-$arch-" $sstate_list
Signature · 1 line
1.7.10.4
PATCH 3/3 sstate-cache-management.sh:fix the incorrect usage of option `-d'
In reply to Hongxu JiaThe description of option -d' is not correct in useage. It is used to remove duplicate and debug at the same time. Use option -D' to control debug info output and the option `-d' to flag remove duplicate.
[YOCTO #3635]
--- scripts/sstate-cache-management.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/sstate-cache-management.sh +2 -2
@@ -72,7 +72,7 @@ Options: -v, --verbose explain what is being done - -d, --debug + -D, --debug show debug info, repeat for more debug info EOF
@@ -393,7 +393,7 @@ while [ -n "$1" ]; do verbose="-v" shift ;; - --debug) + --debug|-D) debug=`expr $debug + 1` echo "Debug level $debug" shift
Signature · 1 line
1.7.10.4