Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] sstate-cache-management.sh: fix it for downloaded file
@ 2012-08-29  9:24 Robert Yang
  2012-08-29  9:24 ` [PATCH 1/1] " Robert Yang
  2012-08-31 15:59 ` [PATCH 0/1] " Saul Wold
  0 siblings, 2 replies; 3+ messages in thread
From: Robert Yang @ 2012-08-29  9:24 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

The following changes since commit b4c5725af4cd85d5644f0373e2674e903c4eab2b:

  yocto-bsp: add missing xserver-xf86-config .bbappend for qemu (2012-08-25 14:47:07 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib robert/sstate
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/sstate

Robert Yang (1):
  sstate-cache-management.sh: fix it for downloaded file

 scripts/sstate-cache-management.sh | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

-- 
1.7.11.2




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

* [PATCH 1/1] sstate-cache-management.sh: fix it for downloaded file
  2012-08-29  9:24 [PATCH 0/1] sstate-cache-management.sh: fix it for downloaded file Robert Yang
@ 2012-08-29  9:24 ` Robert Yang
  2012-08-31 15:59 ` [PATCH 0/1] " Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Yang @ 2012-08-29  9:24 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 scripts/sstate-cache-management.sh | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/scripts/sstate-cache-management.sh b/scripts/sstate-cache-management.sh
index 3a5980c..a1f7c89 100755
--- a/scripts/sstate-cache-management.sh
+++ b/scripts/sstate-cache-management.sh
@@ -211,8 +211,25 @@ remove_duplicated () {
           for arch in $ava_archs; do
               grep -h "/$fn-$arch-" $list_suffix >>$fn_tmp
           done
-          # Use the access time, also delete the .siginfo file
+          # Use the modification time
           to_del=$(ls -t $(cat $fn_tmp) | sed -n '1!p')
+          # The sstate file which is downloaded from the SSTATE_MIRROR is
+          # put in SSTATE_DIR, and there is a symlink in SSTATE_DIR/??/ to
+          # it, so filter it out from the remove list if it should not be
+          # removed.
+          to_keep=$(ls -t $(cat $fn_tmp) | sed -n '1p')
+          for k in $to_keep; do
+              if [ -L "$k" ]; then
+                  # The symlink's destination
+                  k_dest="`readlink -e $k`"
+                  # Maybe it is the one in cache_dir
+                  k_maybe="$cache_dir/${k##/*/}"
+                  # Remove it from the remove list if they are the same.
+                  if [ "$k_dest" = "$k_maybe" ]; then
+                      to_del="`echo $to_del | sed 's#'\"$k_maybe\"'##g'`"
+                  fi
+              fi
+          done
           rm -f $fn_tmp
           gen_rmlist $rm_list "$to_del"
       done
@@ -221,6 +238,7 @@ remove_duplicated () {
       let total_deleted=$total_deleted+$deleted
   done
   rm -f $list_suffix
+  rm -f $sstate_list
   if [ $total_deleted -gt 0 ]; then
       read_confirm
       if [ "$confirm" = "y" -o "$confirm" = "Y" ]; then
-- 
1.7.11.2




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

* Re: [PATCH 0/1] sstate-cache-management.sh: fix it for downloaded file
  2012-08-29  9:24 [PATCH 0/1] sstate-cache-management.sh: fix it for downloaded file Robert Yang
  2012-08-29  9:24 ` [PATCH 1/1] " Robert Yang
@ 2012-08-31 15:59 ` Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-08-31 15:59 UTC (permalink / raw)
  To: Robert Yang; +Cc: Zhenfeng.Zhao, openembedded-core

On 08/29/2012 02:24 AM, Robert Yang wrote:
> The following changes since commit b4c5725af4cd85d5644f0373e2674e903c4eab2b:
>
>    yocto-bsp: add missing xserver-xf86-config .bbappend for qemu (2012-08-25 14:47:07 +0100)
>
> are available in the git repository at:
>
>    git://git.pokylinux.org/poky-contrib robert/sstate
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/sstate
>
> Robert Yang (1):
>    sstate-cache-management.sh: fix it for downloaded file
>
>   scripts/sstate-cache-management.sh | 20 +++++++++++++++++++-
>   1 file changed, 19 insertions(+), 1 deletion(-)
>
Merged into OE-Core

Thanks
	Sau!




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

end of thread, other threads:[~2012-08-31 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-29  9:24 [PATCH 0/1] sstate-cache-management.sh: fix it for downloaded file Robert Yang
2012-08-29  9:24 ` [PATCH 1/1] " Robert Yang
2012-08-31 15:59 ` [PATCH 0/1] " Saul Wold

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