* [PATCH 1/2] buildhistory: write the contents of the sysroot @ 2019-06-27 12:28 Ross Burton 2019-06-27 12:28 ` [PATCH 2/2] buildhistory: report sysroot changes Ross Burton 2019-06-27 13:46 ` [PATCH 1/2] buildhistory: write the contents of the sysroot Martin Jansa 0 siblings, 2 replies; 4+ messages in thread From: Ross Burton @ 2019-06-27 12:28 UTC (permalink / raw) To: openembedded-core 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] buildhistory: report sysroot changes 2019-06-27 12:28 [PATCH 1/2] buildhistory: write the contents of the sysroot Ross Burton @ 2019-06-27 12:28 ` Ross Burton 2019-06-27 13:46 ` [PATCH 1/2] buildhistory: write the contents of the sysroot Martin Jansa 1 sibling, 0 replies; 4+ messages in thread From: Ross Burton @ 2019-06-27 12:28 UTC (permalink / raw) To: openembedded-core Now that the sysroot is written into the build history, write it out. Signed-off-by: Ross Burton <ross.burton@intel.com> --- meta/lib/oe/buildhistory_analysis.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py index 62c7a2e58ea..8af76c6b3a3 100644 --- a/meta/lib/oe/buildhistory_analysis.py +++ b/meta/lib/oe/buildhistory_analysis.py @@ -181,7 +181,7 @@ class ChangeRecord: diff = difflib.unified_diff(alines, blines, self.fieldname, self.fieldname, lineterm='') out += '\n '.join(list(diff)[2:]) out += '\n --' - elif self.fieldname in img_monitor_files or '/image-files/' in self.path: + elif self.fieldname in img_monitor_files or '/image-files/' in self.path or self.fieldname == "sysroot": if self.filechanges or (self.oldvalue and self.newvalue): fieldname = self.fieldname if '/image-files/' in self.path: @@ -571,6 +571,15 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep elif filename.startswith('latest.'): chg = ChangeRecord(path, filename, d.a_blob.data_stream.read().decode('utf-8'), d.b_blob.data_stream.read().decode('utf-8'), True) changes.append(chg) + elif filename == 'sysroot': + alines = d.a_blob.data_stream.read().decode('utf-8').splitlines() + blines = d.b_blob.data_stream.read().decode('utf-8').splitlines() + filechanges = compare_file_lists(alines,blines) + if filechanges: + chg = ChangeRecord(path, filename, None, None, True) + chg.filechanges = filechanges + changes.append(chg) + elif path.startswith('images/'): filename = os.path.basename(d.a_blob.path) if filename in img_monitor_files: -- 2.11.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] buildhistory: write the contents of the sysroot 2019-06-27 12:28 [PATCH 1/2] buildhistory: write the contents of the sysroot Ross Burton 2019-06-27 12:28 ` [PATCH 2/2] buildhistory: report sysroot changes Ross Burton @ 2019-06-27 13:46 ` Martin Jansa 2019-06-27 13:53 ` Burton, Ross 1 sibling, 1 reply; 4+ messages in thread From: Martin Jansa @ 2019-06-27 13:46 UTC (permalink / raw) To: Ross Burton; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 2072 bytes --] > 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 > [-- Attachment #2: Type: text/html, Size: 2848 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] buildhistory: write the contents of the sysroot 2019-06-27 13:46 ` [PATCH 1/2] buildhistory: write the contents of the sysroot Martin Jansa @ 2019-06-27 13:53 ` Burton, Ross 0 siblings, 0 replies; 4+ messages in thread From: Burton, Ross @ 2019-06-27 13:53 UTC (permalink / raw) To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-27 13:53 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-06-27 12:28 [PATCH 1/2] buildhistory: write the contents of the sysroot Ross Burton 2019-06-27 12:28 ` [PATCH 2/2] buildhistory: report sysroot changes Ross Burton 2019-06-27 13:46 ` [PATCH 1/2] buildhistory: write the contents of the sysroot Martin Jansa 2019-06-27 13:53 ` Burton, Ross
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox