Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] Fixes for autobuilder failures
@ 2013-07-02 14:02 Paul Eggleton
  2013-07-02 14:02 ` [PATCH 1/3] rpm: add wrapper for debugedit executable Paul Eggleton
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-07-02 14:02 UTC (permalink / raw)
  To: openembedded-core

Fixes for two build failures showing up on the autobuilder, along with
a resulting improvement for package.bbclass that should let us see the
actual output when debugedit fails if it does so in future.


The following changes since commit ff65497cd9a96d5ab49b16ba1f7e30a216ff4a42:

  classes/insane: remove la2 check which no longer exists from ERROR_QA (2013-06-28 16:33:05 +0100)

are available in the git repository at:

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

Paul Eggleton (3):
  rpm: add wrapper for debugedit executable
  classes/package: print command output when commands fail
  ghostscript: fix patch failure with some versions of patch

 meta/classes/package.bbclass                       | 29 +++++++++++-----------
 meta/recipes-devtools/rpm/rpm_5.4.9.bb             |  2 +-
 .../ghostscript-9.05-NOT-check-endian.patch        |  4 +--
 3 files changed, 17 insertions(+), 18 deletions(-)

-- 
1.8.1.2



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

* [PATCH 1/3] rpm: add wrapper for debugedit executable
  2013-07-02 14:02 [PATCH 0/3] Fixes for autobuilder failures Paul Eggleton
@ 2013-07-02 14:02 ` Paul Eggleton
  2013-07-02 14:02 ` [PATCH 2/3] classes/package: print command output when commands fail Paul Eggleton
  2013-07-02 14:02 ` [PATCH 3/3] ghostscript: fix patch failure with some versions of patch Paul Eggleton
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-07-02 14:02 UTC (permalink / raw)
  To: openembedded-core

This should fix sstate relocation issues with debugedit failing during
do_package on the Yocto Project autobuilder.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-devtools/rpm/rpm_5.4.9.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 0dd5806..3f4854e 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -472,7 +472,7 @@ do_install_append_class-native() {
 		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
 		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
 
-	for rpm_binary in ${D}/${libdir}/rpm/bin/rpm*; do
+	for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do
         	create_wrapper $rpm_binary \
 			RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
 			RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
-- 
1.8.1.2



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

* [PATCH 2/3] classes/package: print command output when commands fail
  2013-07-02 14:02 [PATCH 0/3] Fixes for autobuilder failures Paul Eggleton
  2013-07-02 14:02 ` [PATCH 1/3] rpm: add wrapper for debugedit executable Paul Eggleton
@ 2013-07-02 14:02 ` Paul Eggleton
  2013-07-02 14:02 ` [PATCH 3/3] ghostscript: fix patch failure with some versions of patch Paul Eggleton
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-07-02 14:02 UTC (permalink / raw)
  To: openembedded-core

When external commands such as debugedit fail, it can be useful to see
their output, so use oe.utils.getstatusoutput() instead of
subprocess.call() to capture this and print it on failure.

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

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 8e6029a..5c2d1c6 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -236,7 +236,7 @@ def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
     #
     # sourcefile is also generated containing a list of debugsources
 
-    import stat, subprocess
+    import stat
 
     dvar = d.getVar('PKGD', True)
     objcopy = d.getVar("OBJCOPY", True)
@@ -257,22 +257,22 @@ def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
     # We need to extract the debug src information here...
     if debugsrcdir:
         cmd = "'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (debugedit, workparentdir, debugsrcdir, sourcefile, file)
-        retval = subprocess.call(cmd, shell=True)
+        (retval, output) = oe.utils.getstatusoutput(cmd)
         if retval:
-            bb.fatal("debugedit failed with exit code %s (cmd was %s)" % (retval, cmd))
+            bb.fatal("debugedit failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
 
     bb.utils.mkdirhier(os.path.dirname(debugfile))
 
     cmd = "'%s' --only-keep-debug '%s' '%s'" % (objcopy, file, debugfile)
-    retval = subprocess.call(cmd, shell=True)
+    (retval, output) = oe.utils.getstatusoutput(cmd)
     if retval:
-        bb.fatal("objcopy failed with exit code %s (cmd was %s)" % (retval, cmd))
+        bb.fatal("objcopy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
 
     # Set the debuglink to have the view of the file path on the target
     cmd = "'%s' --add-gnu-debuglink='%s' '%s'" % (objcopy, debugfile, file)
-    retval = subprocess.call(cmd, shell=True)
+    (retval, output) = oe.utils.getstatusoutput(cmd)
     if retval:
-        bb.fatal("objcopy failed with exit code %s (cmd was %s)" % (retval, cmd))
+        bb.fatal("objcopy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
 
     if newmode:
         os.chmod(file, origmode)
@@ -283,7 +283,7 @@ def copydebugsources(debugsrcdir, d):
     # The debug src information written out to sourcefile is further procecessed
     # and copied to the destination here.
 
-    import stat, subprocess
+    import stat
 
     sourcefile = d.expand("${WORKDIR}/debugsources.list")
     if debugsrcdir and os.path.isfile(sourcefile):
@@ -311,7 +311,7 @@ def copydebugsources(debugsrcdir, d):
         processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)"
 
         cmd = processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir)
-        retval = subprocess.call(cmd, shell=True)
+        (retval, output) = oe.utils.getstatusoutput(cmd)
         # Can "fail" if internal headers/transient sources are attempted
         #if retval:
         #    bb.fatal("debug source copy failed with exit code %s (cmd was %s)" % (retval, cmd))
@@ -319,9 +319,9 @@ def copydebugsources(debugsrcdir, d):
 
         # The copy by cpio may have resulted in some empty directories!  Remove these
         cmd = "find %s%s -empty -type d -delete" % (dvar, debugsrcdir)
-        retval = subprocess.call(cmd, shell=True)
+        (retval, output) = oe.utils.getstatusoutput(cmd)
         if retval:
-            bb.fatal("empty directory removal failed with exit code %s (cmd was %s)" % (retval, cmd))
+            bb.fatal("empty directory removal failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
 
         # Also remove debugsrcdir if its empty
         for p in nosuchdir[::-1]:
@@ -446,7 +446,6 @@ python package_do_split_locales() {
 }
 
 python perform_packagecopy () {
-    import subprocess
     dest = d.getVar('D', True)
     dvar = d.getVar('PKGD', True)
 
@@ -454,9 +453,9 @@ python perform_packagecopy () {
     # files to operate on
     # Preserve sparse files and hard links
     cmd = 'tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar)
-    retval = subprocess.call(cmd, shell=True)
+    (retval, output) = oe.utils.getstatusoutput(cmd)
     if retval:
-        bb.fatal("file copy failed with exit code %s (cmd was %s)" % (retval, cmd))
+        bb.fatal("file copy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
 
     # replace RPATHs for the nativesdk binaries, to make them relocatable
     if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d):
@@ -916,7 +915,7 @@ python split_and_strip_files () {
 }
 
 python populate_packages () {
-    import glob, re, subprocess
+    import glob, re
 
     workdir = d.getVar('WORKDIR', True)
     outdir = d.getVar('DEPLOY_DIR', True)
-- 
1.8.1.2



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

* [PATCH 3/3] ghostscript: fix patch failure with some versions of patch
  2013-07-02 14:02 [PATCH 0/3] Fixes for autobuilder failures Paul Eggleton
  2013-07-02 14:02 ` [PATCH 1/3] rpm: add wrapper for debugedit executable Paul Eggleton
  2013-07-02 14:02 ` [PATCH 2/3] classes/package: print command output when commands fail Paul Eggleton
@ 2013-07-02 14:02 ` Paul Eggleton
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2013-07-02 14:02 UTC (permalink / raw)
  To: openembedded-core

Some versions of patch (e.g. 2.6.1.136-31a7 on OpenSUSE 12.2) will
refuse to patch a file via a symlink (probably a fairly sensible
security precaution). The "base/" subdirectory specified within the
ghostscript-9.05-NOT-check-endian.patch file was being lost by the
default application with -p1, but this was not caught on most systems
due to the symlink. Fix the path so that we always patch the file
directly.

Fixes [YOCTO #4773].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 .../ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch
index f78387d..14c036e 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch
@@ -7,8 +7,8 @@ Signed-off-by: Kang Kai <kai.kang@windriver.com>
 Signed-off-by: Sen Zhang <sen.zhang@windriver.com>
 Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
 
---- base/configure.ac.orig	2013-06-24 03:58:26.224723002 -0400
-+++ base/configure.ac	2013-06-24 04:03:29.730807957 -0400
+--- ghostscript/base/configure.ac.orig	2013-06-24 03:58:26.224723002 -0400
++++ ghostscript/base/configure.ac	2013-06-24 04:03:29.730807957 -0400
 @@ -255,13 +255,13 @@
  
  AC_MSG_CHECKING([for big endian])
-- 
1.8.1.2



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

end of thread, other threads:[~2013-07-02 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02 14:02 [PATCH 0/3] Fixes for autobuilder failures Paul Eggleton
2013-07-02 14:02 ` [PATCH 1/3] rpm: add wrapper for debugedit executable Paul Eggleton
2013-07-02 14:02 ` [PATCH 2/3] classes/package: print command output when commands fail Paul Eggleton
2013-07-02 14:02 ` [PATCH 3/3] ghostscript: fix patch failure with some versions of patch Paul Eggleton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox