Skip to contentSkip to conversation

binconfig: improve handling of empty prefixes

PATCH Applied Phil Blundell 2 participants 2 messages May 31, 2011 – Jun 3, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binconfig: improve handling of empty prefixes

This is a backport of 952e5e2b7a5c1deefc939594d40b81a71fb16a54 from oe master.

Without this the script mangling goes very wrong if ${prefix}="". There isn't really any way to fix this in the completely general case, but this patch does work with the two cases I tested (freetype and gpg-error) which were unusable previously.

---
 meta/classes/binconfig.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/binconfig.bbclass +2 -2
index 8e22d2d..3deb541 100644
@@ -6,8 +6,8 @@ def get_binconfig_mangle(d):
 		s += " -e 's:=%s${libdir}:=\\1OELIBDIR:;'" % optional_quote
 		s += " -e 's:=%s${includedir}:=\\1OEINCDIR:;'" % optional_quote
 		s += " -e 's:=%s${datadir}:=\\1OEDATADIR:'" % optional_quote
-		s += " -e 's:=%s${prefix}:=\\1OEPREFIX:'" % optional_quote
-		s += " -e 's:=%s${exec_prefix}:=\\1OEEXECPREFIX:'" % optional_quote
+		s += " -e 's:=%s${prefix}/:=\\1OEPREFIX/:'" % optional_quote
+		s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote
 		s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
 		s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
 		s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
Signature · 1 line
1.7.1
Applied
#1 lore raw
Quoted 17 lines · Phil Blundell

This is a backport of 952e5e2b7a5c1deefc939594d40b81a71fb16a54 from oe master.

Without this the script mangling goes very wrong if ${prefix}="". There isn't really any way to fix this in the completely general case, but this patch does work with the two cases I tested (freetype and gpg-error) which were unusable previously.

---
  meta/classes/binconfig.bbclass |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/binconfig.bbclass +0 -0
index 8e22d2d..3deb541 100644

meta/classes/binconfig.bbclass def get_binconfig_mangle(d): · line 13

Quoted 10 lines
meta/classes/binconfig.bbclass +2 -2
@@ -6,8 +6,8 @@ def get_binconfig_mangle(d):
  		s += " -e 's:=%s${libdir}:=\\1OELIBDIR:;'" % optional_quote
  		s += " -e 's:=%s${includedir}:=\\1OEINCDIR:;'" % optional_quote
  		s += " -e 's:=%s${datadir}:=\\1OEDATADIR:'" % optional_quote
-		s += " -e 's:=%s${prefix}:=\\1OEPREFIX:'" % optional_quote
-		s += " -e 's:=%s${exec_prefix}:=\\1OEEXECPREFIX:'" % optional_quote
+		s += " -e 's:=%s${prefix}/:=\\1OEPREFIX/:'" % optional_quote
+		s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote
  		s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
  		s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
  		s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"

Merged into OE-Core

Thanks
Sau!