diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2026-01-20 15:41:09 +0100 |
|---|---|---|
| committer | Paul Barker <paul@pbarker.dev> | 2026-03-25 17:34:13 +0000 |
| commit | eedd0439ba07094be3f72e5e60234586a1143858 (patch) | |
| tree | 994f698568025966b2f3cf87df6b586a7e6d3a06 /meta | |
| parent | 78193f7a833e89a109344a0b7e77412d7023bd7a (diff) | |
| download | poky-eedd0439ba07094be3f72e5e60234586a1143858.tar.gz | |
lsb.py: strip ' from os-release file
In gentoo the file looks like this:
NAME='Gentoo'
ID='gentoo'
PRETTY_NAME='Gentoo Linux'
VERSION='2.18'
VERSION_ID='2.18'
HOME_URL='https://www.gentoo.org/'
SUPPORT_URL='https://www.gentoo.org/support/'
BUG_REPORT_URL='https://bugs.gentoo.org/'
ANSI_COLOR='1;32'
' were added with:
https://github.com/gentoo/gentoo/commit/2f590e35c9d3d13d5673163527120b2de97fdc80
before that the os-release file looked like this:
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
VERSION_ID="2.18"
The ' is stripped from the ID later in distro_identifier with:
# Filter out any non-alphanumerics and convert to lowercase
distro_id = re.sub(r'\W', '', distro_id).lower()
but not from version which results in a weird NATIVELSBSTRING like:
NATIVELSBSTRING = "gentoo-'2.18'"
And similarly the directory name in sstate-cache:
oe-core $ ls -d sstate-cache/gentoo-*
"sstate-cache/gentoo-'2.18'" sstate-cache/gentoo-2.18
(From OE-Core rev: 9906255a99f13bf6feefca11e8305364efce6450)
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 55f82653deb1ea8f1304fcba4d588bd55695b616)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/lib/oe/lsb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py index 3ec03e5042..1fc3b968a0 100644 --- a/meta/lib/oe/lsb.py +++ b/meta/lib/oe/lsb.py | |||
| @@ -16,7 +16,7 @@ def get_os_release(): | |||
| 16 | key, val = line.rstrip().split('=', 1) | 16 | key, val = line.rstrip().split('=', 1) |
| 17 | except ValueError: | 17 | except ValueError: |
| 18 | continue | 18 | continue |
| 19 | data[key.strip()] = val.strip('"') | 19 | data[key.strip()] = val.strip('"\'') |
| 20 | return data | 20 | return data |
| 21 | 21 | ||
| 22 | def release_dict_osr(): | 22 | def release_dict_osr(): |
