dnf: add os-release and lsb-release into the search list 93/3693/1
authorJackie Huang <jackie.huang@windriver.com>
Wed, 13 May 2020 14:52:55 +0000 (22:52 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Wed, 13 May 2020 23:53:25 +0000 (07:53 +0800)
There is no 'redhat-release' or 'suse-release' provided by yocto, so add
'os-release' and 'lsb-release' into the search list so it will detect
the correct 'releasever'.

Issue-ID: INF-103
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I755afbdda056d8c36cdb6b261ef0730c0023ff8f

meta-stx/recipes-devtools/dnf/dnf/0001-const-add-os-release-and-lsb-release-into-the-search.patch [new file with mode: 0644]
meta-stx/recipes-devtools/dnf/dnf_4.1.0.bbappend

diff --git a/meta-stx/recipes-devtools/dnf/dnf/0001-const-add-os-release-and-lsb-release-into-the-search.patch b/meta-stx/recipes-devtools/dnf/dnf/0001-const-add-os-release-and-lsb-release-into-the-search.patch
new file mode 100644 (file)
index 0000000..29d15c2
--- /dev/null
@@ -0,0 +1,26 @@
+From b3e40ea4aa3b890d3df6b10bb7ef0ddb3efb89a4 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 13 May 2020 22:48:04 +0800
+Subject: [PATCH] const: add os-release and lsb-release into the search list
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ dnf/const.py.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dnf/const.py.in b/dnf/const.py.in
+index 44a204a..a795098 100644
+--- a/dnf/const.py.in
++++ b/dnf/const.py.in
+@@ -25,7 +25,7 @@ CONF_FILENAME='/etc/dnf/dnf.conf' # :api
+ CONF_AUTOMATIC_FILENAME='/etc/dnf/automatic.conf'
+ DISTROVERPKG=('system-release(releasever)', 'system-release',
+               'distribution-release(releasever)', 'distribution-release',
+-              'redhat-release', 'suse-release')
++              'redhat-release', 'suse-release', 'os-release', 'lsb-release')
+ GROUP_PACKAGE_TYPES = ('mandatory', 'default', 'conditional') # :api
+ INSTALLONLYPKGS=['kernel', 'kernel-PAE',
+                  'installonlypkg(kernel)',
+-- 
+2.7.4
+
index 4fb699f..6992397 100644 (file)
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI += "\
+    file://0001-const-add-os-release-and-lsb-release-into-the-search.patch \
+    "
+
 DEPENDS += "\
     python-native \
     "