Commit Graph

18 Commits

Author SHA1 Message Date
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