Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] lib/oe/lsb.py: Stop parsing /etc/SuSE-release
Date: Fri, 20 Mar 2015 13:22:50 +0200	[thread overview]
Message-ID: <1426850570-12024-1-git-send-email-ed.bartosh@linux.intel.com> (raw)

/etc/SuSE-release should not be parsed to obtain release info

Here is the quote from /etc/SuSE-release:
/etc/SuSE-release is deprecated and will be removed in the future,
use /etc/os-release instead

All recent OpenSUSE versions already have /etc/os-release and
oe.lsb/release_dict_file function already parses it.

Current implementation of release_dict_file returns different values
when parsing /etc/SuSE-release and /etc/os-release. This is one more
advantage of getting rid of parsing /etc/SuSE-release.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 meta/lib/oe/lsb.py | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 50c1d47..e25e282 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -37,14 +37,6 @@ def release_dict_file():
             if match:
                 data['DISTRIB_ID'] = match.group(1)
                 data['DISTRIB_RELEASE'] = match.group(2)
-        elif os.path.exists('/etc/SuSE-release'):
-            data = {}
-            data['DISTRIB_ID'] = 'SUSE LINUX'
-            with open('/etc/SuSE-release') as f:
-                for line in f:
-                    if line.startswith('VERSION = '):
-                        data['DISTRIB_RELEASE'] = line[10:].rstrip()
-                        break
         elif os.path.exists('/etc/os-release'):
             data = {}
             with open('/etc/os-release') as f:
-- 
2.1.4



             reply	other threads:[~2015-03-20 11:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 11:22 Ed Bartosh [this message]
2015-03-20 11:38 ` [PATCH] lib/oe/lsb.py: Stop parsing /etc/SuSE-release Paul Eggleton
2015-03-20 14:12   ` Ed Bartosh
2015-03-20 18:37     ` [PATCH] lib/oe/lsb.py: Prioritize parsing of /etc/os-release Ed Bartosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426850570-12024-1-git-send-email-ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox