[1.2] Fix distro checks in sanity.bbclass
cover [1.2] Fix distro checks in sanity.bbclass
After actually testing the distro sanity check on current distro versions on top of master, two issues were discovered; these trivial patches fix those issues.
The following changes since commit 973351cf2e338f07c11395d494193e9c62857f2d:
libproxy: remove dependency on gconf when x11 not in DISTRO_FEATURES (2012-04-18 00:31:24 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/sanity-distro-fix
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/sanity-distro-fix
Paul Eggleton (2):
classes/sanity: trim trailing newline when reading
/etc/redhat-release
classes/sanity: import regular expression module in SuSE distro check
meta/classes/sanity.bbclass | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/2 classes/sanity: trim trailing newline when reading /etc/redhat-release
Any trailing whitespace needs to be stripped before comparing it to the SANITY_TESTED_DISTROS list.
--- meta/classes/sanity.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/sanity.bbclass +1 -1
@@ -120,7 +120,7 @@ def check_supported_distro(e): if os.path.exists("/etc/redhat-release"): f = open("/etc/redhat-release", "r") try: - distro = f.readline() + distro = f.readline().strip() finally: f.close() elif os.path.exists("/etc/SuSE-release"):
Signature · 1 line
1.7.5.4
PATCH 2/2 classes/sanity: import regular expression module in SuSE distro check
In reply to Paul EggletonWe call re.sub here, so we need to "import re" or an error occurs (tested on OpenSuSE 12.1).
--- meta/classes/sanity.bbclass | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
meta/classes/sanity.bbclass +1 -0
@@ -124,6 +124,7 @@ def check_supported_distro(e): finally: f.close() elif os.path.exists("/etc/SuSE-release"): + import re f = open("/etc/SuSE-release", "r") try: distro = f.readline()
Signature · 1 line
1.7.5.4
Saul Wold
AppliedQuoted 13 lines · Paul Eggleton
After actually testing the distro sanity check on current distro versions on top of master, two issues were discovered; these trivial patches fix those issues.
The following changes since commit
973351cf2e338f07c11395d494193e9c62857f2d:libproxy: remove dependency on gconf when x11 not in
DISTRO_FEATURES(2012-04-18 00:31:24 +0100)are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribpaule/sanity-distro-fix
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/sanity-distro-fix
Quoted 8 lines
Paul Eggleton (2):
classes/sanity: trim trailing newline when reading
/etc/redhat-release
classes/sanity: import regular expression module in SuSE distro checkmeta/classes/sanity.bbclass | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Merged into OE-Core
Thanks
Sau!