All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] check lsb_release exists and avoid sstate subdirectory
@ 2012-10-26 14:37 Mihai Lindner
  2012-10-26 14:37 ` [PATCH 1/2] lsb_release: add sanity to avoid Unknown Mihai Lindner
  2012-10-26 14:37 ` [PATCH 2/2] distro_identifier: replace slash with hyphen Mihai Lindner
  0 siblings, 2 replies; 7+ messages in thread
From: Mihai Lindner @ 2012-10-26 14:37 UTC (permalink / raw)
  To: openembedded-core

Make sure `lsb_release` exists;
Documentation updated to reflect the above;
Replace "/" to avoid subdirectories in ./sstate-cache/

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
---
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(-)

-- 
1.7.12.4




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

* [PATCH 1/2] lsb_release: add sanity to avoid Unknown
  2012-10-26 14:37 [PATCH 0/2] check lsb_release exists and avoid sstate subdirectory Mihai Lindner
@ 2012-10-26 14:37 ` Mihai Lindner
  2012-10-26 14:44   ` Paul Eggleton
  2012-10-26 14:37 ` [PATCH 2/2] distro_identifier: replace slash with hyphen Mihai Lindner
  1 sibling, 1 reply; 7+ messages in thread
From: Mihai Lindner @ 2012-10-26 14:37 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
---
 documentation/poky.ent      | 4 ++--
 meta/classes/sanity.bbclass | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/documentation/poky.ent b/documentation/poky.ent
index 8e0af71..ae8e70e 100644
--- a/documentation/poky.ent
+++ b/documentation/poky.ent
@@ -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">
 
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 3806bc5..f0cc11c 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -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')
-- 
1.7.12.4




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

* [PATCH 2/2] distro_identifier: replace slash with hyphen
  2012-10-26 14:37 [PATCH 0/2] check lsb_release exists and avoid sstate subdirectory Mihai Lindner
  2012-10-26 14:37 ` [PATCH 1/2] lsb_release: add sanity to avoid Unknown Mihai Lindner
@ 2012-10-26 14:37 ` Mihai Lindner
  2012-10-28  1:20   ` Saul Wold
  1 sibling, 1 reply; 7+ messages in thread
From: Mihai Lindner @ 2012-10-26 14:37 UTC (permalink / raw)
  To: openembedded-core

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 <mihaix.lindner@linux.intel.com>
---
 meta/lib/oe/lsb.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index c8852a2..9133356 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -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('/','-')
-- 
1.7.12.4




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

* Re: [PATCH 1/2] lsb_release: add sanity to avoid Unknown
  2012-10-26 14:37 ` [PATCH 1/2] lsb_release: add sanity to avoid Unknown Mihai Lindner
@ 2012-10-26 14:44   ` Paul Eggleton
  2012-10-26 15:25     ` Mihai Lindner
  2012-10-26 15:43     ` Mihai Lindner
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Eggleton @ 2012-10-26 14:44 UTC (permalink / raw)
  To: Mihai Lindner; +Cc: openembedded-core

On Friday 26 October 2012 17:37:17 Mihai Lindner wrote:
> 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.
> 
> Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
> ---
>  documentation/poky.ent      | 4 ++--
>  meta/classes/sanity.bbclass | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/documentation/poky.ent b/documentation/poky.ent
> index 8e0af71..ae8e70e 100644
> --- a/documentation/poky.ent
> +++ b/documentation/poky.ent
> @@ -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">
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 3806bc5..f0cc11c 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -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')

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

-- 

Paul Eggleton
Intel Open Source Technology Centre



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

* Re: [PATCH 1/2] lsb_release: add sanity to avoid Unknown
  2012-10-26 14:44   ` Paul Eggleton
@ 2012-10-26 15:25     ` Mihai Lindner
  2012-10-26 15:43     ` Mihai Lindner
  1 sibling, 0 replies; 7+ messages in thread
From: Mihai Lindner @ 2012-10-26 15:25 UTC (permalink / raw)
  To: openembedded-core

On 10/26/2012 05:44 PM, Paul Eggleton wrote:
> On Friday 26 October 2012 17:37:17 Mihai Lindner wrote:
>> 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.
>>
>> Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
>> ---
>>   documentation/poky.ent      | 4 ++--
>>   meta/classes/sanity.bbclass | 2 +-
>>   2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/documentation/poky.ent b/documentation/poky.ent
>> index 8e0af71..ae8e70e 100644
>> --- a/documentation/poky.ent
>> +++ b/documentation/poky.ent
>> @@ -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">
>>
>> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
>> index 3806bc5..f0cc11c 100644
>> --- a/meta/classes/sanity.bbclass
>> +++ b/meta/classes/sanity.bbclass
>> @@ -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')
>
> 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
>

You're right Paul. Thanks.
Please ignore this patch.

2/2 should still apply though.

Cheers,

-- 
Mihai Lindner



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

* Re: [PATCH 1/2] lsb_release: add sanity to avoid Unknown
  2012-10-26 14:44   ` Paul Eggleton
  2012-10-26 15:25     ` Mihai Lindner
@ 2012-10-26 15:43     ` Mihai Lindner
  1 sibling, 0 replies; 7+ messages in thread
From: Mihai Lindner @ 2012-10-26 15:43 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On 10/26/2012 05:44 PM, Paul Eggleton wrote:
> On Friday 26 October 2012 17:37:17 Mihai Lindner wrote:
>> 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.
>>
>> Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
>> ---
>>   documentation/poky.ent      | 4 ++--
>>   meta/classes/sanity.bbclass | 2 +-
>>   2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/documentation/poky.ent b/documentation/poky.ent
>> index 8e0af71..ae8e70e 100644
>> --- a/documentation/poky.ent
>> +++ b/documentation/poky.ent
>> @@ -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">
>>
>> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
>> index 3806bc5..f0cc11c 100644
>> --- a/meta/classes/sanity.bbclass
>> +++ b/meta/classes/sanity.bbclass
>> @@ -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')
>
> 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
>

You're right Paul. Thanks. I'll check for other solutions.
Please ignore this patch.

2/2 should still apply though.

Cheers,

-- 
Mihai Lindner



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

* Re: [PATCH 2/2] distro_identifier: replace slash with hyphen
  2012-10-26 14:37 ` [PATCH 2/2] distro_identifier: replace slash with hyphen Mihai Lindner
@ 2012-10-28  1:20   ` Saul Wold
  0 siblings, 0 replies; 7+ messages in thread
From: Saul Wold @ 2012-10-28  1:20 UTC (permalink / raw)
  To: Mihai Lindner; +Cc: openembedded-core

On 10/26/2012 07:37 AM, Mihai Lindner wrote:
> 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 <mihaix.lindner@linux.intel.com>
> ---
>   meta/lib/oe/lsb.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
> index c8852a2..9133356 100644
> --- a/meta/lib/oe/lsb.py
> +++ b/meta/lib/oe/lsb.py
> @@ -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!




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

end of thread, other threads:[~2012-10-28  1:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-26 14:37 [PATCH 0/2] check lsb_release exists and avoid sstate subdirectory Mihai Lindner
2012-10-26 14:37 ` [PATCH 1/2] lsb_release: add sanity to avoid Unknown Mihai Lindner
2012-10-26 14:44   ` Paul Eggleton
2012-10-26 15:25     ` Mihai Lindner
2012-10-26 15:43     ` Mihai Lindner
2012-10-26 14:37 ` [PATCH 2/2] distro_identifier: replace slash with hyphen Mihai Lindner
2012-10-28  1:20   ` Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.