Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix sed warning message in sstate
@ 2012-05-17 20:34 Mark Hatle
  2012-05-17 20:34 ` [PATCH 1/1] sstate.bbclass: Make sure we don't have an empty fixmepath file Mark Hatle
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Hatle @ 2012-05-17 20:34 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 2cf6e7cf81c0b864b5d51be60094a6eb3e584383:

  fotowall: Add #include ui_wizard.h to ExportWizard.cpp (2012-05-16 07:33:15 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib mhatle/sstate
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/sstate

Mark Hatle (1):
  sstate.bbclass: Make sure we don't have an empty fixmepath file

 meta/classes/sstate.bbclass |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

-- 
1.7.3.4




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

* [PATCH 1/1] sstate.bbclass: Make sure we don't have an empty fixmepath file
  2012-05-17 20:34 [PATCH 0/1] Fix sed warning message in sstate Mark Hatle
@ 2012-05-17 20:34 ` Mark Hatle
  2012-05-18 14:32   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Hatle @ 2012-05-17 20:34 UTC (permalink / raw)
  To: openembedded-core

Jason Wessel noticed that a package without any fixmepath entries would
generate a sed warning about no input files.  This patch resolves that
by ensuring that an empty fixmepath file never gets written into the
sstate archive.  Also we avoid a second message by only doing xargs if
we got input.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 meta/classes/sstate.bbclass |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 3fc615d..ace4c1f 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -330,20 +330,27 @@ def sstate_hardcode_path(d):
 		sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
 		sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
 	
+	fixmefn =  sstate_builddir + "fixmepath"
+
 	sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True)
-	sstate_filelist_cmd = "tee %sfixmepath" % (sstate_builddir)
+	sstate_filelist_cmd = "tee %s" % (fixmefn)
 
 	# fixmepath file needs relative paths, drop sstate_builddir prefix
-	sstate_filelist_relative_cmd = "sed -i -e 's:^%s::g' %sfixmepath" % (sstate_builddir, sstate_builddir)
+	sstate_filelist_relative_cmd = "sed -i -e 's:^%s::g' %s" % (sstate_builddir, fixmefn)
 
 	# Limit the fixpaths and sed operations based on the initial grep search
 	# This has the side effect of making sure the vfs cache is hot
-	sstate_hardcode_cmd = "%s | xargs %s | %s | xargs %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, sstate_sed_cmd)
+	sstate_hardcode_cmd = "%s | xargs %s | %s | xargs --no-run-if-empty %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, sstate_sed_cmd)
 
 	print "Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd)
 	os.system(sstate_hardcode_cmd)
-	print "Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd)
-	os.system(sstate_filelist_relative_cmd)
+
+        # If the fixmefn is empty, remove it..
+	if os.stat(fixmefn).st_size == 0:
+		os.remove(fixmefn)
+	else:
+		print "Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd)
+		os.system(sstate_filelist_relative_cmd)
 
 def sstate_package(ss, d):
     import oe.path
-- 
1.7.3.4




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

* Re: [PATCH 1/1] sstate.bbclass: Make sure we don't have an empty fixmepath file
  2012-05-17 20:34 ` [PATCH 1/1] sstate.bbclass: Make sure we don't have an empty fixmepath file Mark Hatle
@ 2012-05-18 14:32   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2012-05-18 14:32 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Thu, 2012-05-17 at 15:34 -0500, Mark Hatle wrote:
> Jason Wessel noticed that a package without any fixmepath entries would
> generate a sed warning about no input files.  This patch resolves that
> by ensuring that an empty fixmepath file never gets written into the
> sstate archive.  Also we avoid a second message by only doing xargs if
> we got input.
> 
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
> ---
>  meta/classes/sstate.bbclass |   17 ++++++++++++-----
>  1 files changed, 12 insertions(+), 5 deletions(-)

Merged to master, thanks.

Richard




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

end of thread, other threads:[~2012-05-18 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17 20:34 [PATCH 0/1] Fix sed warning message in sstate Mark Hatle
2012-05-17 20:34 ` [PATCH 1/1] sstate.bbclass: Make sure we don't have an empty fixmepath file Mark Hatle
2012-05-18 14:32   ` Richard Purdie

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