Skip to contentSkip to conversation

bitbake.conf: fix distro-less failure expanding FILESPATH

PATCH Applied Denys Dmytriyenko 2 participants 2 messages Mar 22, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake.conf: fix distro-less failure expanding FILESPATH

From: Denys Dmytriyenko <[email protected]>

If DISTRO is not set, FILESPATH becomes littered with directories like files/${DISTRO} etc. It won't bomb until you try to eval it - i.e. manipulating FILESPATH directly with .= works fine, but calling e.g. base_set_filespath() throws this:

ERROR: Failure expanding variable FILESPATH, expression was ${@blah} which triggered exception SyntaxError: EOL while scanning string literal (FILESPATH, line 1)

---
 meta/conf/bitbake.conf |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/conf/bitbake.conf +1 -1
index 17d2f26..16e72e4 100644
@@ -637,7 +637,7 @@ AUTO_LIBNAME_PKGS = "${PACKAGES}"
 # This works for  functions as well, they are really just environment variables.
 # Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
 OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:forcevariable"
-DISTROOVERRIDES ?= "${DISTRO}"
+DISTROOVERRIDES ?= "${@d.getVar('DISTRO', True) or ''}"
 MACHINEOVERRIDES ?= "${MACHINE}"
 MACHINEOVERRIDES[vardepsexclude] = "MACHINE"
 
Signature · 1 line
1.7.8.5
Applied
#1 lore raw
Quoted 21 lines · Denys Dmytriyenko

From: Denys Dmytriyenko<[email protected]>

If DISTRO is not set, FILESPATH becomes littered with directories like files/${DISTRO} etc. It won't bomb until you try to eval it - i.e. manipulating FILESPATH directly with .= works fine, but calling e.g. base_set_filespath() throws this:

ERROR: Failure expanding variable FILESPATH, expression was ${@blah} which triggered exception SyntaxError: EOL while scanning string literal (FILESPATH, line 1)

---
  meta/conf/bitbake.conf |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
meta/conf/bitbake.conf +0 -0
index 17d2f26..16e72e4 100644

meta/conf/bitbake.conf AUTO_LIBNAME_PKGS = "${PACKAGES}" · line 643

Quoted 8 lines
meta/conf/bitbake.conf +1 -1
@@ -637,7 +637,7 @@ AUTO_LIBNAME_PKGS = "${PACKAGES}"
  # This works for  functions as well, they are really just environment variables.
  # Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
  OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:forcevariable"
-DISTROOVERRIDES ?= "${DISTRO}"
+DISTROOVERRIDES ?= "${@d.getVar('DISTRO', True) or ''}"
  MACHINEOVERRIDES ?= "${MACHINE}"
  MACHINEOVERRIDES[vardepsexclude] = "MACHINE"
 

Merged into OE-Core

Thanks
Sau!