[oe-commits] [openembedded-core] 09/25: lib/oe/lsb: Make sure the distro ID is always lowercased

git at git.openembedded.org git at git.openembedded.org
Mon Nov 18 14:48:17 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch warrior
in repository openembedded-core.

commit c552c9f0fe0f8aaa230a4c6a410a00e8b99a74ae
Author: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
AuthorDate: Tue Nov 5 23:08:39 2019 +0100

    lib/oe/lsb: Make sure the distro ID is always lowercased
    
    In commit 8689e561 (lib/oe/lsb: attempt to ensure consistent distro id
    regardless of source), the distro ID returned by
    oe.lsb.distro_identifier() was lowercased, but only if a release
    version is also present.
    
    This changes the code to always lowercase the distro ID, including the
    default distro ID "unknown", which is used if no other ID can be
    identified.
    
    Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/lib/oe/lsb.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 4f2b419..43e4638 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -110,12 +110,12 @@ def distro_identifier(adjust_hook=None):
     if adjust_hook:
         distro_id, release = adjust_hook(distro_id, release)
     if not distro_id:
-        return "Unknown"
-    # Filter out any non-alphanumerics
-    distro_id = re.sub(r'\W', '', distro_id)
+        return "unknown"
+    # Filter out any non-alphanumerics and convert to lowercase
+    distro_id = re.sub(r'\W', '', distro_id).lower()
 
     if release:
-        id_str = '{0}-{1}'.format(distro_id.lower(), release)
+        id_str = '{0}-{1}'.format(distro_id, release)
     else:
         id_str = distro_id
     return id_str.replace(' ','-').replace('/','-')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list