Skip to contentSkip to conversation

base.bbclass: add cleansstate task between clean and cleanall

PATCH Applied Martin Jansa 5 participants 5 messages Jun 2, 2011 – Jun 6, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 base.bbclass: add cleansstate task between clean and cleanall

* sometimes it's usefull to remove only sstate cache and keep downloaded sources for rebuild

---
 meta/classes/base.bbclass |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
meta/classes/base.bbclass +5 -2
index 8f4ef1e..6f0484e 100644
@@ -408,10 +408,13 @@ def check_gcc3(data):
 	
 	return False
 
-addtask cleanall after do_clean
-python do_cleanall() {
+addtask cleansstate after do_clean
+python do_cleansstate() {
         sstate_clean_cachefiles(d)
+}
 
+addtask cleanall after do_cleansstate
+python do_cleanall() {
         src_uri = (bb.data.getVar('SRC_URI', d, True) or "").split()
         if len(src_uri) == 0:
             return
Signature · 1 line
1.7.5.3
#1 lore raw

Op 2 jun 2011, om 20:56 heeft Martin Jansa het volgende geschreven:

Quoted 1 line

* sometimes it's usefull to remove only sstate cache and keep downloaded sources for rebuild

just what I needed!

#2 lore raw
Quoted 1 line · Koen Kooi

Op 2 jun 2011, om 20:56 heeft Martin Jansa het

volgende geschreven:

Quoted 1 line
Quoted 1 line

* sometimes it's usefull to remove only sstate

cache and keep downloaded

Quoted 3 lines
Quoted 1 line

sources for rebuild

just what I needed!

very helpful in development of patches and making sure that recipe is recompiled at will which is needed during making patches

Quoted 4 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-

bin/mailman/listinfo/openembedded-core

#3 lore raw
In reply to Martin Jansa
Quoted 17 lines · Martin Jansa

* sometimes it's usefull to remove only sstate cache and keep downloaded sources for rebuild

---
 meta/classes/base.bbclass |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
meta/classes/base.bbclass +0 -2
index 8f4ef1e..6f0484e 100644
@@ -408,10 +408,13 @@ def check_gcc3(data):
 
 	return False
 
-addtask cleanall after do_clean
-python do_cleanall() {

meta/classes/base.bbclass def check_gcc3(data): · line 420

Quoted 10 lines
meta/classes/base.bbclass +5 -0
+addtask cleansstate after do_clean
+python do_cleansstate() {
         sstate_clean_cachefiles(d)
+}
 
+addtask cleanall after do_cleansstate
+python do_cleanall() {
         src_uri = (bb.data.getVar('SRC_URI', d, True) or "").split()
         if len(src_uri) == 0:
             return

I do this _a lot_ manually. This would take some of the guesswork and lazy wildcard usage deleting more than is necessary. Is there any documentation necessary to make it clear how this new clean directive would be used? I know there is some resistance to adding additional clean variants - some docs might help assuage that?

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
Applied
#4 lore raw
In reply to Martin Jansa
Quoted 17 lines · Martin Jansa

* sometimes it's usefull to remove only sstate cache and keep downloaded sources for rebuild

---
  meta/classes/base.bbclass |    7 +++++--
  1 files changed, 5 insertions(+), 2 deletions(-)
meta/classes/base.bbclass +0 -2
index 8f4ef1e..6f0484e 100644
@@ -408,10 +408,13 @@ def check_gcc3(data):
 
  	return False
 
-addtask cleanall after do_clean
-python do_cleanall() {

meta/classes/base.bbclass def check_gcc3(data): · line 420

Quoted 10 lines
meta/classes/base.bbclass +5 -0
+addtask cleansstate after do_clean
+python do_cleansstate() {
          sstate_clean_cachefiles(d)
+}
 
+addtask cleanall after do_cleansstate
+python do_cleanall() {
          src_uri = (bb.data.getVar('SRC_URI', d, True) or "").split()
          if len(src_uri) == 0:
              return

Merged into oe-core

Thanks
Sau!