Skip to contentSkip to conversation

kernel: Clean DEPLOYDIR before do_deploy runs

PATCH In review Richard Purdie 2 participants 4 messages Jan 25, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel: Clean DEPLOYDIR before do_deploy runs

If we don't do this, the deploy sstate object contains an every increasing number of modules tarballs and kernel images, one per execution of "-c deploy -f".

Cleaning the directory before we start makes things much tidier.

meta/classes/kernel.bbclass +1 -0
index dee6f7d..f37affc 100644
@@ -511,6 +511,7 @@ kernel_do_deploy() {
 		ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin
 	fi
 }
+do_deploy[cleandirs] = "${DEPLOYDIR}"
 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
 do_deploy[prefuncs] += "package_get_auto_pr"
 
#1 lore raw
Quoted 4 lines · Richard Purdie

If we don't do this, the deploy sstate object contains an every increasing number of modules tarballs and kernel images, one per execution of "-c deploy -f".

Stupid question, since my sstate/deploy foo is weak at times. Does this mean that only a single set of modules + kernel images will be in tmp/deploy ? Or is it only sstate that is being cleaned ?

I sometimes need multiple copies around for debug purposes, so I'm wondering if that is still possible with this change ?

Bruce

Quoted 18 lines

Cleaning the directory before we start makes things much tidier.

meta/classes/kernel.bbclass +1 -0
index dee6f7d..f37affc 100644
@@ -511,6 +511,7 @@ kernel_do_deploy() {
  		ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin
  	fi
  }
+do_deploy[cleandirs] = "${DEPLOYDIR}"
  do_deploy[dirs] = "${DEPLOYDIR} ${B}"
  do_deploy[prefuncs] += "package_get_auto_pr"
 
#2 lore raw
Quoted 10 lines · Bruce Ashfield
Quoted 4 lines · Richard Purdie

If we don't do this, the deploy sstate object contains an every increasing number of modules tarballs and kernel images, one per execution of "-c deploy -f".

Stupid question, since my sstate/deploy foo is weak at times. Does this mean that only a single set of modules + kernel images will be in tmp/deploy ? Or is it only sstate that is being cleaned ?

One side effect is that it will remove the older copies. The older copies were being built into each new sstate object which was growing huge.

Quoted 2 lines

I sometimes need multiple copies around for debug purposes, so I'm wondering if that is still possible with this change ?

You'd need to archive them before running another build since this effectively cleans up the older copies now. This is due to the system removing the old sstate "object", then installing a new one to replace it. You can't keep the old ones around easily as they're named to conflict (and hence replace each other).

Cheers,

Richard

#3 lore raw
Quoted 16 lines · Richard Purdie
Quoted 10 lines · Bruce Ashfield
Quoted 4 lines · Richard Purdie

If we don't do this, the deploy sstate object contains an every increasing number of modules tarballs and kernel images, one per execution of "-c deploy -f".

Stupid question, since my sstate/deploy foo is weak at times. Does this mean that only a single set of modules + kernel images will be in tmp/deploy ? Or is it only sstate that is being cleaned ?

One side effect is that it will remove the older copies. The older copies were being built into each new sstate object which was growing huge.

Quoted 8 lines
Quoted 2 lines

I sometimes need multiple copies around for debug purposes, so I'm wondering if that is still possible with this change ?

You'd need to archive them before running another build since this effectively cleans up the older copies now. This is due to the system removing the old sstate "object", then installing a new one to replace it. You can't keep the old ones around easily as they're named to conflict (and hence replace each other).

Ack'd. I'll have to remember to copy out what I need! :)

Bruce

Quoted 5 lines

Cheers,

Richard