All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Buildhistory fix
@ 2017-05-09  0:38 Paul Eggleton
  2017-05-09  0:38 ` [PATCH 1/1] classes/buildhistory: fix failures collecting output signatures Paul Eggleton
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2017-05-09  0:38 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 123962018251dfb1d6ca5aa5c0d02534007de3ab:

  build-appliance-image: Update to master head revision (2017-05-01 08:56:43 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/buildhistory-fix1
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/buildhistory-fix1

Paul Eggleton (1):
  classes/buildhistory: fix failures collecting output signatures

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

-- 
2.9.3



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] classes/buildhistory: fix failures collecting output signatures
  2017-05-09  0:38 [PATCH 0/1] Buildhistory fix Paul Eggleton
@ 2017-05-09  0:38 ` Paul Eggleton
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2017-05-09  0:38 UTC (permalink / raw)
  To: openembedded-core

It's possible for tasks to stage symlinks that point to non-existent
files; an example is ncurses-native.do_populate_sysroot. There wasn't
any error checking here so this broke the build when "task" was included
in BUILDHISTORY_FEATURES. In any case we shouldn't be following symlinks
and getting the sha256sum of the link target - we need concern ourselves
only with the target path, so check if the file is a link and sha256 the
target path instead if it is. If it's neither a regular file nor a
symlink (perhaps a pipe or a device), just skip it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/buildhistory.bbclass | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index f543bb7..8eafdc9 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -301,6 +301,8 @@ python buildhistory_emit_outputsigs() {
     if not "task" in (d.getVar('BUILDHISTORY_FEATURES') or "").split():
         return
 
+    import hashlib
+
     taskoutdir = os.path.join(d.getVar('BUILDHISTORY_DIR'), 'task', 'output')
     bb.utils.mkdirhier(taskoutdir)
     currenttask = d.getVar('BB_CURRENTTASK')
@@ -314,7 +316,17 @@ python buildhistory_emit_outputsigs() {
             if fname == 'fixmepath':
                 continue
             fullpath = os.path.join(root, fname)
-            filesigs[os.path.relpath(fullpath, cwd)] = bb.utils.sha256_file(fullpath)
+            try:
+                if os.path.islink(fullpath):
+                    sha256 = hashlib.sha256(os.readlink(fullpath).encode('utf-8')).hexdigest()
+                elif os.path.isfile(fullpath):
+                    sha256 = bb.utils.sha256_file(fullpath)
+                else:
+                    continue
+            except OSError:
+                bb.warn('buildhistory: unable to read %s to get output signature' % fullpath)
+                continue
+            filesigs[os.path.relpath(fullpath, cwd)] = sha256
     with open(taskfile, 'w') as f:
         for fpath, fsig in sorted(filesigs.items(), key=lambda item: item[0]):
             f.write('%s %s\n' % (fpath, fsig))
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/1] Buildhistory fix
  2012-05-04 13:36 [PATCH 0/1] Buildhistory fix Paul Eggleton
@ 2012-05-04 17:23 ` Saul Wold
  0 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-05-04 17:23 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
  Cc: Paul Eggleton, Scott Garman

On 05/04/2012 06:36 AM, Paul Eggleton wrote:
> This fix should also go into 1.2.1.
>
>
> The following change since commit 0be64cda0a20ca3aab75ee0cc360236d2dc40c95:
>
>    gcc-package-target: add libexec for plugin (2012-05-03 15:38:07 +0100)
>
> is available in the git repository at:
>    git://git.openembedded.org/openembedded-core-contrib paule/buildhistory-commit
>    http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/buildhistory-commit
>
> Paul Eggleton (1):
>    buildhistory: fix multiple commit of images and packages at the same
>      time
>
>   meta/classes/buildhistory.bbclass |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
Merged into OE-Core

Thanks
	Sau!



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 0/1] Buildhistory fix
@ 2012-05-04 13:36 Paul Eggleton
  2012-05-04 17:23 ` Saul Wold
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2012-05-04 13:36 UTC (permalink / raw)
  To: openembedded-core, Scott Garman

This fix should also go into 1.2.1.


The following change since commit 0be64cda0a20ca3aab75ee0cc360236d2dc40c95:

  gcc-package-target: add libexec for plugin (2012-05-03 15:38:07 +0100)

is available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib paule/buildhistory-commit
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/buildhistory-commit

Paul Eggleton (1):
  buildhistory: fix multiple commit of images and packages at the same
    time

 meta/classes/buildhistory.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 0/1] buildhistory fix
@ 2011-12-05 18:28 Paul Eggleton
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2011-12-05 18:28 UTC (permalink / raw)
  To: openembedded-core

Because of a screw-up by me when I fixed the copyright date in the
buildhistory branch, a previous version of the tree got pushed and the
default to not create package history files for every version got lost.
This patch restores the functionality.

(To be clear, this change *was* in the original RFC pull request.)

The following changes since commit d512a41ed8843a66ed9c5c5978c5f33248083464:

  libx11-trim: Fix keysymdir configure option mismatch (2011-12-05 16:47:50 +0000)

are available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib paule/buildhistory-fixes
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/buildhistory-fixes

Paul Eggleton (1):
  classes/buildhistory: do not save old packagehistory files by default

 meta/classes/buildhistory.bbclass |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-09  0:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-09  0:38 [PATCH 0/1] Buildhistory fix Paul Eggleton
2017-05-09  0:38 ` [PATCH 1/1] classes/buildhistory: fix failures collecting output signatures Paul Eggleton
  -- strict thread matches above, loose matches on Subject: below --
2012-05-04 13:36 [PATCH 0/1] Buildhistory fix Paul Eggleton
2012-05-04 17:23 ` Saul Wold
2011-12-05 18:28 [PATCH 0/1] buildhistory fix Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.