Patchwork rm_work: remove package and packages-split dirs

login
register
mail settings
Submitter Martin Jansa
Date Feb. 1, 2013, 5:59 p.m.
Message ID <1359741581-16500-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/43853/
State Accepted, archived
Headers show

Comments

Martin Jansa - Feb. 1, 2013, 5:59 p.m.
* as described in
  http://git.openembedded.org/openembedded-core/commit/?id=6107ee294afde395e39d084c33e8e94013c625a9

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/rm_work.bbclass | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
Richard Purdie - Feb. 4, 2013, 1:26 p.m.
On Fri, 2013-02-01 at 18:59 +0100, Martin Jansa wrote:
> * as described in
>   http://git.openembedded.org/openembedded-core/commit/?id=6107ee294afde395e39d084c33e8e94013c625a9
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/classes/rm_work.bbclass | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
> index 997dcd1..24d0679 100644
> --- a/meta/classes/rm_work.bbclass
> +++ b/meta/classes/rm_work.bbclass
> @@ -19,13 +19,13 @@ do_rm_work () {
>      do
>          if [ `basename ${S}` = $dir ]; then
>              rm -rf $dir
> -        # The package and packages-split directories are retained by sstate for 
> -        # do_package so we retain them here too. Anything in sstate 'plaindirs' 
> -        # should be retained. Also retain logs and other files in temp.
> -        elif [ $dir != 'temp' ] && [ $dir != 'package' ]  && [ $dir != 'packages-split' ]; then
> +        # Anything in sstate 'plaindirs' should be retained. 
> +        # Also retain logs and other files in temp.
> +        elif [ $dir != 'temp' ]; then
>              rm -rf $dir
>          fi

The first part of the comment is wrong and we might as well drop the if
[ `basename ${S}` = $dir ]; too? 

>      done
> +
>      # Need to add pseudo back or subsqeuent work in this workdir
>      # might fail since setscene may not rerun to recreate it
>      mkdir ${WORKDIR}/pseudo/
> @@ -54,6 +54,11 @@ do_rm_work () {
>                  i=dummy
>                  break
>                  ;;

I'd put a comment in here: "We remove do_package entirely, including any
sstate version since otherwise we'd need to leave 'plaindirs' around
such as 'packages' and 'packages-split' and these can be large. No enf
of chain tasks depend directly on do_package anymore.". 

> +            *do_package|*do_package_setscene)
> +                i=dummy
> +                rm -f $i;
> +                break
> +                ;;
>              *_setscene*)
>                  i=dummy
>                  break

Otherwise looks good, this is simpler than I'd expected which is nice :)

Cheers,

Richard

Patch

diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 997dcd1..24d0679 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -19,13 +19,13 @@  do_rm_work () {
     do
         if [ `basename ${S}` = $dir ]; then
             rm -rf $dir
-        # The package and packages-split directories are retained by sstate for 
-        # do_package so we retain them here too. Anything in sstate 'plaindirs' 
-        # should be retained. Also retain logs and other files in temp.
-        elif [ $dir != 'temp' ] && [ $dir != 'package' ]  && [ $dir != 'packages-split' ]; then
+        # Anything in sstate 'plaindirs' should be retained. 
+        # Also retain logs and other files in temp.
+        elif [ $dir != 'temp' ]; then
             rm -rf $dir
         fi
     done
+
     # Need to add pseudo back or subsqeuent work in this workdir
     # might fail since setscene may not rerun to recreate it
     mkdir ${WORKDIR}/pseudo/
@@ -54,6 +54,11 @@  do_rm_work () {
                 i=dummy
                 break
                 ;;
+            *do_package|*do_package_setscene)
+                i=dummy
+                rm -f $i;
+                break
+                ;;
             *_setscene*)
                 i=dummy
                 break