Commit Graph

32 Commits

Author SHA1 Message Date
Jan Sarenik 64d2f13d1a scripts/sstate-cache-management.sh: Change wording
Use "out of" rather than "from" in the output.

(From OE-Core rev: c712529030c71b45bb8ae647c17319c2647aedff)

Signed-off-by: Jan Sarenik <jajomojo@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:43 +00:00
Jacob Kroon b3c688cf1f sstate-cache-management: Minor cleanup of help text
(From OE-Core rev: a039ef9d116f0bab0bbb6d25867666b10057f2ad)

(From OE-Core rev: 2f22c098c3ada8c0952c7711f7a7f5b6421e6aea)

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-29 17:20:11 +01:00
Martin Jansa 3f0425dc12 sstate-cache-management: rm_by_stamps - discover all suffixes like remove_duplicated does
* instead of hard coding list of sstate enabled task use
  the same function as remove_duplicated to find them in
  sstate-cache directory

(From OE-Core rev: dfdb397db5865c3287cd9ccb5ea9a336eb77ca90)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
Martin Jansa fec6bd763f sstate-cache-management: skip populate_lic archives when removing duplicates
* there are 2 issues

* all *gcc* recipes produce "duplicate" files and we cannot keep just the newest one:
  OE qemux86@ ~/build/oe-core $ find sstate-cache/ | grep gcc.*populate_lic
  sstate-cache/cd/sstate:gcc::4.8.2:r0::3:cd8d1a33b832662b624f5e4bd9f55154_populate_lic.tgz
  sstate-cache/cd/sstate:gcc::4.8.2:r0::3:cd8d1a33b832662b624f5e4bd9f55154_populate_lic.tgz.siginfo
  sstate-cache/d5/sstate:gcc::4.8.2:r0::3:d591af812395cc386e017fa2c8fa0722_populate_lic.tgz
  sstate-cache/d5/sstate:gcc::4.8.2:r0::3:d591af812395cc386e017fa2c8fa0722_populate_lic.tgz.siginfo
  sstate-cache/f7/sstate:gcc::4.8.2:r0::3:f74cfd4982fd7c349a5418f07297f955_populate_lic.tgz
  sstate-cache/f7/sstate:gcc::4.8.2:r0::3:f74cfd4982fd7c349a5418f07297f955_populate_lic.tgz.siginfo
  sstate-cache/74/sstate:gcc::4.8.2:r0::3:7489e4502cb446506b9829cda13c7630_populate_lic.tgz
  sstate-cache/74/sstate:gcc::4.8.2:r0::3:7489e4502cb446506b9829cda13c7630_populate_lic.tgz.siginfo

  OE qemux86@ ~/build/oe-core $ find tmp-eglibc/stamps/ | grep gcc.*populate_lic
  tmp-eglibc/stamps/i586-oe-linux/gcc-cross-initial/4.8.2-r0.do_populate_lic_setscene.cd8d1a33b832662b624f5e4bd9f55154
  tmp-eglibc/stamps/i586-oe-linux/libgcc/4.8.2-r0.do_populate_lic_setscene.f74cfd4982fd7c349a5418f07297f955
  tmp-eglibc/stamps/i586-oe-linux/gcc-cross/4.8.2-r0.do_populate_lic_setscene.d591af812395cc386e017fa2c8fa0722
  tmp-eglibc/stamps/i586-oe-linux/gcc-runtime/4.8.2-r0.do_populate_lic_setscene.7489e4502cb446506b9829cda13c7630

* the same for target and native versions of the same recipe:
  OE qemux86@ ~/build/oe-core $ find tmp-eglibc/stamps/ | grep opkg-utils.*populate_lic
  tmp-eglibc/stamps/x86_64-linux/opkg-utils-native/0.1.8+gitAUTOINC+c33b217016-r0.do_populate_lic_setscene.dd21a3c5444482ce90be4c9a33d806f1
  tmp-eglibc/stamps/i586-oe-linux/opkg-utils/0.1.8+gitAUTOINC+c33b217016-r0.do_populate_lic_setscene.8571422f9e311dc41bb6b21e71a09bc0

  OE qemux86@ ~/build/oe-core $ find sstate-cache/ | grep opkg-utils.*populate_lic
  sstate-cache/dd/sstate:opkg-utils::0.1.8+gitAUTOINC+c33b217016:r0::3:dd21a3c5444482ce90be4c9a33d806f1_populate_lic.tgz.siginfo
  sstate-cache/dd/sstate:opkg-utils::0.1.8+gitAUTOINC+c33b217016:r0::3:dd21a3c5444482ce90be4c9a33d806f1_populate_lic.tgz
  sstate-cache/85/sstate:opkg-utils::0.1.8+gitAUTOINC+c33b217016:r0::3:8571422f9e311dc41bb6b21e71a09bc0_populate_lic.tgz.siginfo
  sstate-cache/85/sstate:opkg-utils::0.1.8+gitAUTOINC+c33b217016:r0::3:8571422f9e311dc41bb6b21e71a09bc0_populate_lic.tgz

* similar problem for .siginfo file of do_patch:
  OE qemux86@ ~/build/oe-core $ find sstate-cache/ | grep eglibc.*patch
  sstate-cache/99/sstate:eglibc::2.19:r0::3:99b7e1d688e4c6c659b458c9c57611df_patch.tgz.siginfo
  sstate-cache/11/sstate:eglibc::2.19:r0::3:11401ddd208a753fee17696b14dc1e52_patch.tgz.siginfo

  OE qemux86@ ~/build/oe-core $ find tmp-eglibc/stamps/  | grep /eglibc.*patch
  tmp-eglibc/stamps/i586-oe-linux/eglibc-initial/2.19-r0.do_patch.sigdata.99b7e1d688e4c6c659b458c9c57611df
  tmp-eglibc/stamps/i586-oe-linux/eglibc/2.19-r0.do_patch.sigdata.11401ddd208a753fee17696b14dc1e52

* maybe these should have ideally identical signatures, but before it's fixed lets
  just skip removing them

(From OE-Core rev: 9ae16469e70714acf7cb1e6c5238934a6b20d58a)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
Martin Jansa 07e632a26c sstate-cache-management: rm_by_stamps - remove .siginfo and .done files
* it's possible that corresponding .tgz files were already removed
  (e.g. with -d option and older version of this script) and this
  won't find orphaned .siginfo or .done files to remove
* add sort -u to count files found multiple times only once

(From OE-Core rev: 5a58cd2474ed96d6f58576203bedf8211d309c99)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
Martin Jansa 42b12dc544 sstate-cache-management: rm_by_stamps - include signatures of .sigdata. files
* there are .siginfo files in sstate-cache, but STAMPS_DIR calls them
  .sigdata, make sure that such signatures are kept, because some tasks
  like do_package, don't have _setscene or main task entry and are
  removed:

  stamps:
  tmp-eglibc/stamps/i586-oe-linux/busybox/1.22.1-r0.do_package.sigdata.cd6f625471ef1b20a9379e90519db6f1
  tmp-eglibc/stamps/i586-oe-linux/busybox/1.22.1-r0.do_package_write_ipk.f20fe66285219f23373fc64d5de1d412
  tmp-eglibc/stamps/i586-oe-linux/busybox/1.22.1-r0.do_package_write_ipk.sigdata.f20fe66285219f23373fc64d5de1d412
  tmp-eglibc/stamps/i586-oe-linux/busybox/1.22.1-r0.do_packagedata.sigdata.c55a3dbe90010c15aa3294753fbd402e
  tmp-eglibc/stamps/i586-oe-linux/busybox/1.22.1-r0.do_packagedata_setscene.c55a3dbe90010c15aa3294753fbd402e.qemux86
  sstate (we want to keep all in this case):
  sstate-cache/c5/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:c55a3dbe90010c15aa3294753fbd402e_packagedata.tgz
  sstate-cache/c5/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:c55a3dbe90010c15aa3294753fbd402e_packagedata.tgz.siginfo
  sstate-cache/cd/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:cd6f625471ef1b20a9379e90519db6f1_package.tgz
  sstate-cache/cd/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:cd6f625471ef1b20a9379e90519db6f1_package.tgz.siginfo
  sstate-cache/f2/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:f20fe66285219f23373fc64d5de1d412_package_write_ipk.tgz
  sstate-cache/f2/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:f20fe66285219f23373fc64d5de1d412_package_write_ipk.tgz.siginfo

(From OE-Core rev: c2e5c0b6bdc432449ad1792176aa28667c3d34b9)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
Martin Jansa 8615d574a8 sstate-cache-management.sh: Don't use echo -n
* when debug is enabled it causes more confusion than what it's gaining
  without debug enabled

(From OE-Core rev: 53899da20cd439ae53974e507f3dd86cd6879455)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 15:50:20 +00:00
Martin Jansa 99183f9c45 sstate-cache-management.sh: Allow to remove old .siginfo and .done files for all tasks
* this allows to remove them even for tasks without sstate archives (e.g. rm_work, multilib_install, ..)
  whole list of tasks found in one of my sstate-cache directories:
  sstate:xxx_boostconfig.tgz ... 6
  sstate:xxx_bundle_initramfs.tgz ... 31
  sstate:xxx_compile.tgz ... 47894
  sstate:xxx_compile_kernelmodules.tgz ... 31
  sstate:xxx_compile_ptest_base.tgz ... 68
  sstate:xxx_configure.tgz ... 48247
  sstate:xxx_configure_ptest_base.tgz ... 68
  sstate:xxx_deploy.tgz ... 8
  sstate:xxx_evacuate_scripts.tgz ... 58
  sstate:xxx_fetch.tgz ... 7045
  sstate:xxx_generate.tgz ... 812
  sstate:xxx_generate_qt_config_file.tgz ... 576
  sstate:xxx_generate_toolchain_file.tgz ... 219
  sstate:xxx_install.tgz ... 48273
  sstate:xxx_install_locale.tgz ... 58
  sstate:xxx_install_ptest_base.tgz ... 68
  sstate:xxx_kernel_checkout.tgz ... 14
  sstate:xxx_kernel_configcheck.tgz ... 34
  sstate:xxx_kernel_configme.tgz ... 17
  sstate:xxx_kernel_link_vmlinux.tgz ... 30
  sstate:xxx_make_scripts.tgz ... 42
  sstate:xxx_multilib_install.tgz ... 29
  sstate:xxx_package.tgz ... 13848
  sstate:xxx_package_write_ipk.tgz ... 4615
  sstate:xxx_packagedata.tgz ... 4613
  sstate:xxx_pam_sanity.tgz ... 3
  sstate:xxx_patch.tgz ... 7883
  sstate:xxx_populate_adt.tgz ... 28
  sstate:xxx_populate_ide_support.tgz ... 33
  sstate:xxx_populate_lic.tgz ... 1718
  sstate:xxx_populate_sysroot.tgz ... 5094
  sstate:xxx_prepare_qmake_symlink.tgz ... 6
  sstate:xxx_prepsources.tgz ... 168
  sstate:xxx_rm_work.tgz ... 107630
  sstate:xxx_rm_work_all.tgz ... 52563
  sstate:xxx_rootfs.tgz ... 13
  sstate:xxx_sanitize_sources.tgz ... 8
  sstate:xxx_sizecheck.tgz ... 31
  sstate:xxx_strip.tgz ... 31
  sstate:xxx_uboot_mkimage.tgz ... 31
  sstate:xxx_unpack.tgz ... 7857
  sstate:xxx_unpack_extra.tgz ... 6
  sstate:xxx_validate_branches.tgz ... 14

* with this patches most of these files are removed as well
  Figuring out the sstate:xxx_compile ... (0 from 0 .tgz files for
  compile suffix will be removed or 42310 from 47795 when counting also
  .siginfo and .done files)

(From OE-Core rev: 66c6505e7ee0ea2efa13d1257982f721b26d83ae)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 15:50:19 +00:00
Martin Jansa 6bfa52afee sstate-cache-management: improve shown numbers of removed files
* deleted files were counting .siginfo and .done files, but total_files were counting only .tgz archives
  so it could show confusing output like:
  Figuring out the sstate:xxx_packagedata.tgz ... (21098 from 15162 files for packagedata suffix will be removed)
* split the counts and show both
* fix .sigdata sometimes used instead of .siginfo
* this will also show new "suffixes" which have only .siginfo files but
  no .tgz, e.g.:
  Figuring out the sstate:xxx_rm_work.tgz ... (0 from 0 .tgz files for
  rm_work suffix will be removed or 0 from 107630 when counting also
  .siginfo and .done files)
  because now we're storing siginfo files from all intermediate tasks,
  but they are not being removed by this script

(From OE-Core rev: ec881997c748ed8bfb3fc75797367ce3599bd5b4)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 15:50:19 +00:00
Martin Jansa 358dd840c5 sstate-cache-management.sh: don't remove all packagedata sstate archives
* packagedata task was introduced in:
  commit 6107ee294afde395e39d084c33e8e94013c625a9
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Wed Jan 23 14:27:33 2013 +0000
  Subject: Split do_packagedata task from do_package
* rm_by_stamps wasn't using do_packagedata or do_packagedata_setscene
  stamp files to find which sstate archives to keep, so it was removing
  all of them

(From OE-Core rev: 66ef2e62a7b5fe36c718f56a8ea9d7f6fd77c393)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:30:34 +00:00
Martin Jansa 7010358190 sstate-cache-management.sh: Fix available architectures
* grep for AVAILTUNES isn't enough in cases where AVAILTUNE doesn't
  match exactly with TUNE_PKGARCH, e.g. AVAILTUNE "cortexa8thf-neon"
  and TUNE_PKGARCH "cortexa8t2hf-vfp-neon", instead of trying to find
  dynamically every available TUNE_PKGARCH (we have _a lot_ of them
  even with oe-core only), add parameter --extra-archs where user can
  define extra architectures he supports in given build
* Don't replace '-' with '_' for extra-archs, it does apply to MACHINE
  names and some AVAILTUNES, but e.g. cortexa8thf-neon shouldn't be
  converted to cortexa8thf_neon
* Add empty architecture for populate_lic sstate archives
* Add ${build_arch}_${arch} combinations for toolchain recipes (e.g.
  gcc-cross is using x86_64_i586

(From OE-Core rev: a27cc54fb2d0e59f3a800893c1848cb26a7c5335)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:30:34 +00:00
Martin Jansa 6d295ce0c5 sstate-cache-management.sh: Show total number of files when showing how many will be deleted
* it's good to see some the ratio of delted files until now it was
  showing only when all or none files were to be removed

(From OE-Core rev: 54e6e25f1a369fa6c21ce0f9db3479b1a481825f)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:30:34 +00:00
Martin Jansa a397dec90b sstate-cache-management.sh: Fix rm_by_stamps() to work after SSTATE_SWSPEC change
* format of filenames for sstate archives was changed in:
  commit 6f823a23c5f1d0ffa0a27db1c1bc1907de788505
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Fri Dec 20 12:06:02 2013 +0000
  Subject: sstate: Convert to use ':' as a filename sperator and use SSTATE_SWSPEC globally
* this one doesn't need special care for old sstate- names
  they will be removed automatically as they don't match with
  any checksum in rigth format from stamps directory

(From OE-Core rev: aa36f9c9b5abac58de899f98803d1c4375678044)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:30:33 +00:00
Martin Jansa a8a7e7b289 sstate-cache-management.sh: Fix remove_duplicated() to work after SSTATE_SWSPEC change
* format of filenames for sstate archives was changed in:
  commit 6f823a23c5f1d0ffa0a27db1c1bc1907de788505
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Fri Dec 20 12:06:02 2013 +0000
  Subject: sstate: Convert to use ':' as a filename sperator and use SSTATE_SWSPEC globally
* remove_duplicated() wasn't able to find available architectures and
  duplicate files since this change
* add extra step to remove old sstate archives starting with sstate-
  (instead of sstate:)

(From OE-Core rev: ddb26341611c3dff41ea92a73d93ec01ae2865de)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:30:33 +00:00
Henning Heinold f8461951ac scripts/sstate-cache-management.sh: fix return value by adding exit 0
* usefull for jenkins jobs, which will otherwise fail
  because 1 was returned

(From OE-Core rev: a864de0f2a326f857125229fc986845044931196)

Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-05 11:13:53 +01:00
Hongxu Jia a18e02b01f sstate-cache-management.sh: don't hardcode available sstate_suffixes
Don't hardcode available sstate_suffixes(it misses `packagedata'), find them
dynamically in $sstate_list.

[YOCTO #3635]

(From OE-Core rev: 26adfcb8c33fe62f5e15c3591efc670d70cbb5b7)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-28 23:15:47 +00:00
Hongxu Jia 2032301ef4 sstate-cache-management.sh:fix the incorrect usage of option `-d'
The 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]

(From OE-Core rev: fa0b40c233e757fe986aa45798b35b60b89c879f)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-28 23:15:47 +00:00
Hongxu Jia fa066de5f1 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]

(From OE-Core rev: c201fdc2f01f398060cd953a1640a685797d9e64)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-28 23:15:47 +00:00
Richard Purdie 56e3fcc387 scripts/sstate-cache-management.sh: Fix stamp handling after recent layout change
(From OE-Core rev: 8df3350d107322380582c807ccc92ea353b543ab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-24 15:12:27 +00:00
Martin Jansa c5fa8e29af sstate-cache-management: hide error message when one of possible layer location doesn't exist
* fixes [YOCTO #3116]

(From OE-Core rev: bde88116d9d7e86ca7ecac4cf990689f972b0b1c)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-10 15:13:40 +01:00
Martin Jansa d658f48efa sstate-cache-management: hide error message when one of possible layer location doesn't exist
* fixes [YOCTO #3116]

(From OE-Core rev: b02d334e0e6a19a1bf3550add68f5770a835c772)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-27 16:35:23 +01:00
Martin Jansa 0740f82aea sstate-cache-management.sh: fix remove_duplicated when multiple archs were built
* The problem is that you're looking for duplicates across all available archs, so
  armv4t and armv7a populate_sysroot are considered duplicate and only last one is
  kept, but to rebuild from sstate-cache you need both!

(From OE-Core rev: 46309e96300c35f6e8a5f33512a6a38720c629d2)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:53:10 +01:00
Martin Jansa 40b14022db sstate-cache-management.sh: add option to enable debug output
(From OE-Core rev: 97a6b51c776bbcde14101834fdf9e1d19ae19185)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:53:09 +01:00
Martin Jansa 40d2cbe480 sstate-cache-management.sh: don't hardcode available machines only to qemu*
* find them dynamically in layers like AVAILTUNES

(From OE-Core rev: fb6d838b1b80f26e9261acfd3893a7ef7f9e1940)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:53:09 +01:00
Martin Jansa 6b3f0424c9 sstate-cache-management.sh: look in meta* above oe-core dir when looking for available tunes
* many layouts have other layers on the same level as oe-core checkout

(From OE-Core rev: 6faf27b771176ff691c17a2dbfa98ac7b3ed1fc7)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:53:09 +01:00
Martin Jansa 0b43a85154 sstate-cache-management.sh: fix regexp in AVAILTUNES grep
* it was also picking line
  openembedded-core/meta/conf/machine/include/README:AVAILTUNES - This is a list of all of the tuning definitions currently
  filling all_archs with wrong entries

(From OE-Core rev: ceeefd964026e11ce0bb3b0285dbf9917533ae5e)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:53:09 +01:00
Martin Jansa c2a76d7b10 sstate-cache-management.sh: fix regexp in checksum grep
* using checksum without recipe/task name doesn't seem like good idea IMHO

(From OE-Core rev: ef1044da4b30b9a1264a7c83727a722a4b0b60cc)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:53:08 +01:00
Robert Yang 43a7c66113 sstate-cache-management.sh: fix it for downloaded file
Fix it for the downloaded sstate cache file
* The downloaded sstate cache file is in SSTATE_DIR, and there is a
  symlink points to it, the sstate cache file should not be removed if
  the corresponding symlink is kept, it would be removed when the
  symlink is removed (with -L option).

* Fix a comment line.

[YOCTO #2897]

(From OE-Core rev: 12ed7e6bb215e70b119d5ce123e36e2fd380ff1e)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-30 17:44:06 -07:00
Robert Yang 6163148c17 sstate-cache-management.sh: update for the SSTATE_MIRRORS
Several fixes:
* We have put the sstate file to SSTATE_DIR/??/ currently, but the
  sstate file on the SSTATE_MIRRORS or the obsolete one is still in
  SSTATE_DIR/ (no subdir), update the script to support manage them.

* Remove the related ".done" file in the SSTATE_DIR.

* Add a "-L, --follow-symlink" which will remove both the symbol link and
  the destination file

* Change the "ls -u file_list" (access time) to "ls -t file_list"
  (change tiem), since the "ls -u" and readlink will change the
  symlink's access time, which would make the result inconsistent.
  A solution is save the access time before every "ls -u" and "readlink",
  save it back after the command, but this would cause performance lost
  since it needs check each file and modify the symlink's status. Use
  the "-t" doesn't cause much different.

[YOCTO #2897]

(From OE-Core rev: 209ec08787981345a7f62b10a8a5c2ace0887c8e)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-20 16:53:17 +01:00
Robert Yang f8d5e2b6c8 sstate-cache-management.sh: update it for the new layout
Update it for the new layout of sstate-cache.

Note: It doesn't handle the old sstate-cache/sstate-xxx.tgz (or
siginfo), the user should remove it manually (rm -fr
sstate-cache/sstate-* would be OK).

[YOCTO #2897]

(From OE-Core rev: fcb61aa552a641faafdf2216fa57ba5ac6b9991f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-15 15:12:51 +01:00
Robert Yang 24f5fe8210 sstate-cache-management.sh: fixes and enhancement
Fix a few problems and enhance its functions, it shoud be more useful
than before.

* Search in meta and meta-* for archs, and grep AVAILTUNES for archs,
  (only search meta, and grep DEFAULTTUNE before), add the host arch.
  and also can search in extra layers with --extra-layer.

* Reduce the analyzing time when remove duplicated files. It would cost
  more than 10 minutes to analyze 11,000 files before, now only needs
  about 50 seconds.

* Check the access time rather than create time.

* Need the user's confirm before really remove the file, or use --yes to
  assume yes.

* Add --stamps-dir to keep sstate files which are used by the build
  directory, and remove others this can make the sstate cache dir clean,
  it is faster and should be useful than the --remove-duplicated.

* Add --verbose to explain what is being done.

* Add "-d" which is short for --remove-duplicated

[YOCTO #2198]

(From OE-Core rev: 769a000428e4b2462a4e6d8f179b5816b8ec2417)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-30 17:20:23 +01:00
Robert Yang 6224e30834 A script to clean obsolete sstate cache files
There would be many obsolete cache files in the SSTATE_DIR after several
builds, this script can remove the obsolete one for a pkg, only leave
the up to date one.

Here is the help text:

sstate-cache-management.sh <OPTION>

Options:
  --help, -h
        Display this help and exit.

  --cache-dir=<sstate cache dir>
        Specify sstate cache directory, will use the environment
        variable SSTATE_CACHE_DIR if it is not specified.

  --remove-duplicated
        Remove the duplicated sstate cache files of one package, only
        the newest one would be kept.

[YOCTO #1682]

(From OE-Core rev: 7c99ef6d2173b14e1109a540ee5ae47b56d707e7)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-23 23:59:40 +00:00