sstate-cache-management.sh: update for the SSTATE_MIRRORS
authorRobert Yang <liezhi.yang@windriver.com>
Mon, 20 Aug 2012 08:29:46 +0000 (16:29 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 20 Aug 2012 15:53:17 +0000 (16:53 +0100)
commit992d2f82ebaf70c4faafceab2fadb4309f15fba7
tree7ece56832e0476869fa5f3453b6b66ef653a6cbe
parent0a8064180c90f790138054ec596941ca88477a27
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>
scripts/sstate-cache-management.sh