check lsb_release exists and avoid sstate subdirectory
cover check lsb_release exists and avoid sstate subdirectory
Make sure lsb_release exists;
Documentation updated to reflect the above; Replace "/" to avoid subdirectories in ./sstate-cache/
---
The following changes since commit 3f14eb3674d44b61fe19016902d41cae57be8e6c:
poky.conf: Add multiarch to DISTRO_FEATURES (2012-10-25 17:50:19 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mihai/lsb_release
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mihai/lsb_release
Mihai Lindner (2):
lsb_release: add sanity to avoid Unknown
distro_identifier: replace slash with hyphen
documentation/poky.ent | 4 ++-- meta/classes/sanity.bbclass | 2 +- meta/lib/oe/lsb.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.12.4
PATCH 1/2 lsb_release: add sanity to avoid Unknown
Check for lsb_release command (package name should be lsb-release for most package managers) to avoid "Unknown" Linux distributions, untested distro warnings and "Unknown" dir in ./sstate-cache/
Also add lsb-release in host's software needs, Fedora and CentOS for now.
--- documentation/poky.ent | 4 ++-- meta/classes/sanity.bbclass | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
documentation/poky.ent +2 -2
@@ -50,8 +50,8 @@ <!ENTITY OE_INIT_FILE "oe-init-build-env"> <!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "awk wget git-core diffstat unzip texinfo build-essential chrpath"> <!ENTITY FEDORA_HOST_PACKAGES_ESSENTIAL "awk make wget tar bzip2 gzip python unzip perl patch diffutils diffstat git -cpp gcc gcc-c++ eglibc-devel texinfo chrpath ccache"> +cpp gcc gcc-c++ eglibc-devel texinfo chrpath ccache lsb-release"> <!ENTITY OPENSUSE_HOST_PACKAGES_ESSENTIAL "python gcc gcc-c++ git chrpath make wget diffstat texinfo python-curses"> <!ENTITY CENTOS_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch diffutils diffstat git -cpp gcc gcc-c++ glibc-devel texinfo chrpath"> +cpp gcc gcc-c++ glibc-devel texinfo chrpath lsb-release">
meta/classes/sanity.bbclass +1 -1
@@ -2,7 +2,7 @@ # Sanity check the users setup for common misconfigurations # -SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar gzip gawk chrpath wget cpio" +SANITY_REQUIRED_UTILITIES ?= "bzip2 chrpath cpio diffstat gawk git gzip lsb_release makeinfo patch tar wget" python check_bblayers_conf() { bblayers_fn = os.path.join(d.getVar('TOPDIR', True), 'conf/bblayers.conf')
Signature · 1 line
1.7.12.4
Re: [PATCH 1/2] lsb_release: add sanity to avoid Unknown
Quoted 41 lines · On Friday 26 October 2012 17:37:17 Mihai Lindner wrote:
Check for
lsb_releasecommand (package name should be lsb-release for most package managers) to avoid "Unknown" Linux distributions, untested distro warnings and "Unknown" dir in ./sstate-cache/
Also add lsb-release in host's software needs, Fedora and CentOS for now.Signed-off-by Mihai Lindner <[email protected]>--- documentation/poky.ent | 4 ++-- meta/classes/sanity.bbclass | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)documentation/poky.ent +0
-0@@ -50,8 +50,8 @@ <!ENTITY OE_INIT_FILE "oe-init-build-env"> <!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "awk wget git-core diffstat unziptexinfo build-essential chrpath"> <!ENTITY
FEDORA_HOST_PACKAGES_ESSENTIAL"awk make wget tar bzip2 gzip python unzip perl patch diffutils diffstat git -cpp gcc gcc-c++ eglibc-devel texinfo chrpath ccache"> +cpp gcc gcc-c++ eglibc-devel texinfo chrpath ccache lsb-release">
<!ENTITYOPENSUSE_HOST_PACKAGES_ESSENTIAL"python gcc gcc-c++ git chrpath
make wget diffstat texinfo python-curses"> <!ENTITYCENTOS_HOST_PACKAGES_ESSENTIAL"gawk make wget tar bzip2 gzip python unzip perl patch diffutils diffstat git -cpp gcc gcc-c++ glibc-devel texinfo chrpath">documentation/poky.ent +1
-0+cpp gcc gcc-c++ glibc-devel texinfo chrpath lsb-release">meta/classes/sanity.bbclass +0
-1@@ -2,7 +2,7 @@ # Sanity check the users setup for common misconfigurations # -SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar gzipgawk chrpath wget cpio" +SANITY_REQUIRED_UTILITIES ?= "bzip2 chrpath cpio diffstat gawk git gzip
lsb_releasemakeinfo patch tar wget"
Quoted 3 lines
python
check_bblayers_conf(){
bblayers_fn= os.path.join(d.getVar('TOPDIR', True),
'conf/bblayers.conf')
I don't particularly like this, because on some distros LSB comes as one package which pulls in a whole bunch of unnecessary things for a headless server. I think we need an alternative fix for this for the cases where lsb_release is not available.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [PATCH 1/2] lsb_release: add sanity to avoid Unknown
Quoted 51 lines · Paul Eggleton
Quoted 41 lines · On Friday 26 October 2012 17:37:17 Mihai Lindner wrote:
Check for
lsb_releasecommand (package name should be lsb-release for most package managers) to avoid "Unknown" Linux distributions, untested distro warnings and "Unknown" dir in ./sstate-cache/
Also add lsb-release in host's software needs, Fedora and CentOS for now.Signed-off-by Mihai Lindner <[email protected]>--- documentation/poky.ent | 4 ++-- meta/classes/sanity.bbclass | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)documentation/poky.ent +0
-0@@ -50,8 +50,8 @@ <!ENTITY OE_INIT_FILE "oe-init-build-env"> <!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "awk wget git-core diffstat unziptexinfo build-essential chrpath"> <!ENTITY
FEDORA_HOST_PACKAGES_ESSENTIAL"awk make wget tar bzip2 gzip python unzip perl patch diffutils diffstat git -cpp gcc gcc-c++ eglibc-devel texinfo chrpath ccache">
+cpp gcc gcc-c++ eglibc-devel texinfo chrpath ccache lsb-release">
<!ENTITYOPENSUSE_HOST_PACKAGES_ESSENTIAL"python gcc gcc-c++ git chrpath
make wget diffstat texinfo python-curses"> <!ENTITYCENTOS_HOST_PACKAGES_ESSENTIAL"gawk make wget tar bzip2 gzip python unzip perl patch diffutils diffstat git -cpp gcc gcc-c++ glibc-devel texinfo chrpath">documentation/poky.ent +1
-0+cpp gcc gcc-c++ glibc-devel texinfo chrpath lsb-release">meta/classes/sanity.bbclass +0
-1@@ -2,7 +2,7 @@ # Sanity check the users setup for common misconfigurations # -SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar gzipgawk chrpath wget cpio" +SANITY_REQUIRED_UTILITIES ?= "bzip2 chrpath cpio diffstat gawk git gzip
lsb_releasemakeinfo patch tar wget"Quoted 3 lines
python
check_bblayers_conf(){
bblayers_fn= os.path.join(d.getVar('TOPDIR', True),
'conf/bblayers.conf')I don't particularly like this, because on some distros LSB comes as one package which pulls in a whole bunch of unnecessary things for a headless server. I think we need an alternative fix for this for the cases where
lsb_releaseis not available.
Quoted 3 lines
Cheers,
Paul
You're right Paul. Thanks. I'll check for other solutions. Please ignore this patch.
2/2 should still apply though.
Cheers,
Signature · 1 line
Mihai Lindner
Re: [PATCH 1/2] lsb_release: add sanity to avoid Unknown
In reply to Paul EggletonQuoted 51 lines · Paul Eggleton
Quoted 41 lines · On Friday 26 October 2012 17:37:17 Mihai Lindner wrote:
Check for
lsb_releasecommand (package name should be lsb-release for most package managers) to avoid "Unknown" Linux distributions, untested distro warnings and "Unknown" dir in ./sstate-cache/
Also add lsb-release in host's software needs, Fedora and CentOS for now.Signed-off-by Mihai Lindner <[email protected]>--- documentation/poky.ent | 4 ++-- meta/classes/sanity.bbclass | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)documentation/poky.ent +0
-0@@ -50,8 +50,8 @@ <!ENTITY OE_INIT_FILE "oe-init-build-env"> <!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "awk wget git-core diffstat unziptexinfo build-essential chrpath"> <!ENTITY
FEDORA_HOST_PACKAGES_ESSENTIAL"awk make wget tar bzip2 gzip python unzip perl patch diffutils diffstat git -cpp gcc gcc-c++ eglibc-devel texinfo chrpath ccache">
+cpp gcc gcc-c++ eglibc-devel texinfo chrpath ccache lsb-release">
<!ENTITYOPENSUSE_HOST_PACKAGES_ESSENTIAL"python gcc gcc-c++ git chrpath
make wget diffstat texinfo python-curses"> <!ENTITYCENTOS_HOST_PACKAGES_ESSENTIAL"gawk make wget tar bzip2 gzip python unzip perl patch diffutils diffstat git -cpp gcc gcc-c++ glibc-devel texinfo chrpath">documentation/poky.ent +1
-0+cpp gcc gcc-c++ glibc-devel texinfo chrpath lsb-release">meta/classes/sanity.bbclass +0
-1@@ -2,7 +2,7 @@ # Sanity check the users setup for common misconfigurations # -SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar gzipgawk chrpath wget cpio" +SANITY_REQUIRED_UTILITIES ?= "bzip2 chrpath cpio diffstat gawk git gzip
lsb_releasemakeinfo patch tar wget"Quoted 3 lines
python
check_bblayers_conf(){
bblayers_fn= os.path.join(d.getVar('TOPDIR', True),
'conf/bblayers.conf')I don't particularly like this, because on some distros LSB comes as one package which pulls in a whole bunch of unnecessary things for a headless server. I think we need an alternative fix for this for the cases where
lsb_releaseis not available.
Quoted 3 lines
Cheers,
Paul
You're right Paul. Thanks.
Please ignore this patch.
2/2 should still apply though.
Cheers,
Signature · 1 line
Mihai Lindner
PATCH 2/2 distro_identifier: replace slash with hyphen
In reply to Mihai LindnerUse "-" instead of "/" in "n/a" strings ("Distributor ID" and/or "Release"), provided by lsb_release.
This leads to directories and subdirectories created in ./sstate-cache/ e.g. Distro-n/a/ where "Distro-n" is dir and "a" is subdir.
--- meta/lib/oe/lsb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/lsb.py +1 -1
@@ -31,4 +31,4 @@ def distro_identifier(adjust_hook=None): distro_id, release = adjust_hook(distro_id, release) if not distro_id: return "Unknown" - return '{0}-{1}'.format(distro_id, release).replace(' ','-') + return '{0}-{1}'.format(distro_id, release).replace(' ','-').replace('/','-')
Signature · 1 line
1.7.12.4
Saul Wold
AppliedRe: [PATCH 2/2] distro_identifier: replace slash with hyphen
Quoted 16 lines · Mihai Lindner
Use "-" instead of "/" in "n/a" strings ("Distributor ID" and/or "Release"), provided by
lsb_release.
This leads to directories and subdirectories created in ./sstate-cache/ e.g. Distro-n/a/ where "Distro-n" is dir and "a" is subdir.Signed-off-by Mihai Lindner <[email protected]>--- meta/lib/oe/lsb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/lib/oe/lsb.py +0
-0
meta/lib/oe/lsb.py def distro_identifier(adjust_hook=None): · line 34
Quoted 5 lines
meta/lib/oe/lsb.py +1
-1@@ -31,4 +31,4 @@ def distro_identifier(adjust_hook=None): distro_id, release = adjust_hook(distro_id, release) if not distro_id: return "Unknown" - return '{0}-{1}'.format(distro_id, release).replace(' ','-') + return '{0}-{1}'.format(distro_id, release).replace(' ','-').replace('/','-')
Merged into OE-Core
Thanks
Sau!