diff mbox series

[1/2] buildhistory: write the contents of the sysroot

Message ID 20190627122854.28435-1-ross.burton@intel.com
State Accepted
Commit b3ac82a27ab70ed6996fe3087a578ac637820329
Headers show
Series [1/2] buildhistory: write the contents of the sysroot | expand

Commit Message

Ross Burton June 27, 2019, 12:28 p.m. UTC
Changes to the sysroot as just as interesting during development, so write the
file listing for the sysroot to buildhistory too.

Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/classes/buildhistory.bbclass | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Martin Jansa June 27, 2019, 1:46 p.m. UTC | #1
> Changes to the sysroot as just as


small typo in commit message if you need to update this commit again for
whatever other reason.

On Thu, Jun 27, 2019 at 2:29 PM Ross Burton <ross.burton@intel.com> wrote:

> Changes to the sysroot as just as interesting during development, so write

> the

> file listing for the sysroot to buildhistory too.

>

> Signed-off-by: Ross Burton <ross.burton@intel.com>

> ---

>  meta/classes/buildhistory.bbclass | 10 +++++++++-

>  1 file changed, 9 insertions(+), 1 deletion(-)

>

> diff --git a/meta/classes/buildhistory.bbclass

> b/meta/classes/buildhistory.bbclass

> index 2e501df24b4..baa7c8e2799 100644

> --- a/meta/classes/buildhistory.bbclass

> +++ b/meta/classes/buildhistory.bbclass

> @@ -60,15 +60,23 @@ SSTATEPOSTUNPACKFUNCS[vardepvalueexclude] .= "|

> buildhistory_emit_outputsigs"

>  # When extending build history, derive your class from

> buildhistory.bbclass

>  # and extend this list here with the additional files created by the

> derived

>  # class.

> -BUILDHISTORY_PRESERVE = "latest latest_srcrev"

> +BUILDHISTORY_PRESERVE = "latest latest_srcrev sysroot"

>

>  PATCH_GIT_USER_EMAIL ?= "buildhistory@oe"

>  PATCH_GIT_USER_NAME ?= "OpenEmbedded"

>

> +buildhistory_emit_sysroot() {

> +       mkdir --parents ${BUILDHISTORY_DIR_PACKAGE}

> +       buildhistory_list_files ${SYSROOT_DESTDIR}

> ${BUILDHISTORY_DIR_PACKAGE}/sysroot

> +}

> +

>  #

>  # Write out metadata about this package for comparison when writing

> future packages

>  #

>  python buildhistory_emit_pkghistory() {

> +    if d.getVar('BB_CURRENTTASK') in ['populate_sysroot',

> 'populate_sysroot_setscene']:

> +        bb.build.exec_func("buildhistory_emit_sysroot", d)

> +

>      if not d.getVar('BB_CURRENTTASK') in ['packagedata',

> 'packagedata_setscene']:

>          return 0

>

> --

> 2.11.0

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>
<div dir="ltr">&gt; Changes to the sysroot as just as<div><div><br></div><div>small typo in commit message if you need to update this commit again for whatever other reason.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 27, 2019 at 2:29 PM Ross Burton &lt;<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Changes to the sysroot as just as interesting during development, so write the<br>
file listing for the sysroot to buildhistory too.<br>
<br>
Signed-off-by: Ross Burton &lt;<a href="mailto:ross.burton@intel.com" target="_blank">ross.burton@intel.com</a>&gt;<br>

---<br>
 meta/classes/buildhistory.bbclass | 10 +++++++++-<br>
 1 file changed, 9 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass<br>
index 2e501df24b4..baa7c8e2799 100644<br>
--- a/meta/classes/buildhistory.bbclass<br>
+++ b/meta/classes/buildhistory.bbclass<br>
@@ -60,15 +60,23 @@ SSTATEPOSTUNPACKFUNCS[vardepvalueexclude] .= &quot;| buildhistory_emit_outputsigs&quot;<br>
 # When extending build history, derive your class from buildhistory.bbclass<br>
 # and extend this list here with the additional files created by the derived<br>
 # class.<br>
-BUILDHISTORY_PRESERVE = &quot;latest latest_srcrev&quot;<br>
+BUILDHISTORY_PRESERVE = &quot;latest latest_srcrev sysroot&quot;<br>
<br>
 PATCH_GIT_USER_EMAIL ?= &quot;buildhistory@oe&quot;<br>
 PATCH_GIT_USER_NAME ?= &quot;OpenEmbedded&quot;<br>
<br>
+buildhistory_emit_sysroot() {<br>
+       mkdir --parents ${BUILDHISTORY_DIR_PACKAGE}<br>
+       buildhistory_list_files ${SYSROOT_DESTDIR} ${BUILDHISTORY_DIR_PACKAGE}/sysroot<br>
+}<br>
+<br>
 #<br>
 # Write out metadata about this package for comparison when writing future packages<br>
 #<br>
 python buildhistory_emit_pkghistory() {<br>
+    if d.getVar(&#39;BB_CURRENTTASK&#39;) in [&#39;populate_sysroot&#39;, &#39;populate_sysroot_setscene&#39;]:<br>
+        bb.build.exec_func(&quot;buildhistory_emit_sysroot&quot;, d)<br>
+<br>
     if not d.getVar(&#39;BB_CURRENTTASK&#39;) in [&#39;packagedata&#39;, &#39;packagedata_setscene&#39;]:<br>
         return 0<br>
<br>
-- <br>
2.11.0<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Ross Burton June 27, 2019, 1:53 p.m. UTC | #2
Well spotted, thanks.

Changed in my branch.
Ross

On Thu, 27 Jun 2019 at 14:47, Martin Jansa <martin.jansa@gmail.com> wrote:
>

> > Changes to the sysroot as just as

>

> small typo in commit message if you need to update this commit again for whatever other reason.

>

> On Thu, Jun 27, 2019 at 2:29 PM Ross Burton <ross.burton@intel.com> wrote:

>>

>> Changes to the sysroot as just as interesting during development, so write the

>> file listing for the sysroot to buildhistory too.

>>

>> Signed-off-by: Ross Burton <ross.burton@intel.com>

>> ---

>>  meta/classes/buildhistory.bbclass | 10 +++++++++-

>>  1 file changed, 9 insertions(+), 1 deletion(-)

>>

>> diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass

>> index 2e501df24b4..baa7c8e2799 100644

>> --- a/meta/classes/buildhistory.bbclass

>> +++ b/meta/classes/buildhistory.bbclass

>> @@ -60,15 +60,23 @@ SSTATEPOSTUNPACKFUNCS[vardepvalueexclude] .= "| buildhistory_emit_outputsigs"

>>  # When extending build history, derive your class from buildhistory.bbclass

>>  # and extend this list here with the additional files created by the derived

>>  # class.

>> -BUILDHISTORY_PRESERVE = "latest latest_srcrev"

>> +BUILDHISTORY_PRESERVE = "latest latest_srcrev sysroot"

>>

>>  PATCH_GIT_USER_EMAIL ?= "buildhistory@oe"

>>  PATCH_GIT_USER_NAME ?= "OpenEmbedded"

>>

>> +buildhistory_emit_sysroot() {

>> +       mkdir --parents ${BUILDHISTORY_DIR_PACKAGE}

>> +       buildhistory_list_files ${SYSROOT_DESTDIR} ${BUILDHISTORY_DIR_PACKAGE}/sysroot

>> +}

>> +

>>  #

>>  # Write out metadata about this package for comparison when writing future packages

>>  #

>>  python buildhistory_emit_pkghistory() {

>> +    if d.getVar('BB_CURRENTTASK') in ['populate_sysroot', 'populate_sysroot_setscene']:

>> +        bb.build.exec_func("buildhistory_emit_sysroot", d)

>> +

>>      if not d.getVar('BB_CURRENTTASK') in ['packagedata', 'packagedata_setscene']:

>>          return 0

>>

>> --

>> 2.11.0

>>

>> --

>> _______________________________________________

>> Openembedded-core mailing list

>> Openembedded-core@lists.openembedded.org

>> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 2e501df24b4..baa7c8e2799 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -60,15 +60,23 @@  SSTATEPOSTUNPACKFUNCS[vardepvalueexclude] .= "| buildhistory_emit_outputsigs"
 # When extending build history, derive your class from buildhistory.bbclass
 # and extend this list here with the additional files created by the derived
 # class.
-BUILDHISTORY_PRESERVE = "latest latest_srcrev"
+BUILDHISTORY_PRESERVE = "latest latest_srcrev sysroot"
 
 PATCH_GIT_USER_EMAIL ?= "buildhistory@oe"
 PATCH_GIT_USER_NAME ?= "OpenEmbedded"
 
+buildhistory_emit_sysroot() {
+	mkdir --parents ${BUILDHISTORY_DIR_PACKAGE}
+	buildhistory_list_files ${SYSROOT_DESTDIR} ${BUILDHISTORY_DIR_PACKAGE}/sysroot
+}
+
 #
 # Write out metadata about this package for comparison when writing future packages
 #
 python buildhistory_emit_pkghistory() {
+    if d.getVar('BB_CURRENTTASK') in ['populate_sysroot', 'populate_sysroot_setscene']:
+        bb.build.exec_func("buildhistory_emit_sysroot", d)
+
     if not d.getVar('BB_CURRENTTASK') in ['packagedata', 'packagedata_setscene']:
         return 0