summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package_manager.py
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2017-06-21 15:58:21 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-23 11:44:14 +0100
commitee7c7150f0e11b9b65f18e2a4dc1893bd3fc5d3f (patch)
treea532922c7bac2dddf025c28dedf67e975c3d4b03 /meta/lib/oe/package_manager.py
parentf74fd6dbcc664b4f902e5c88cee835f9877dde45 (diff)
downloadpoky-ee7c7150f0e11b9b65f18e2a4dc1893bd3fc5d3f.tar.gz
package_manager.py: set dnf's releasever setting from DISTRO_CODENAME
So that: 1) dnf does not complain anymore about releasever not being set and then fail for the same reason; 2) it's possible to refer to $releasever in dnf package feed configuration (repo paths in particular) without hardconding the release name (pyro, morty, etc.) (From OE-Core rev: 789e3fc225adbb61f10aaa3bbc3677856f5f0238) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package_manager.py')
-rw-r--r--meta/lib/oe/package_manager.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index bc4e3013f0..72503eb9d3 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -494,9 +494,11 @@ class RpmPM(PackageManager):
494 # This prevents accidental matching against libsolv's built-in policies 494 # This prevents accidental matching against libsolv's built-in policies
495 if len(archs) <= 1: 495 if len(archs) <= 1:
496 archs = archs + ["bogusarch"] 496 archs = archs + ["bogusarch"]
497 archconfdir = "%s/%s" %(self.target_rootfs, "etc/dnf/vars/") 497 confdir = "%s/%s" %(self.target_rootfs, "etc/dnf/vars/")
498 bb.utils.mkdirhier(archconfdir) 498 bb.utils.mkdirhier(confdir)
499 open(archconfdir + "arch", 'w').write(":".join(archs)) 499 open(confdir + "arch", 'w').write(":".join(archs))
500 distro_codename = self.d.getVar('DISTRO_CODENAME')
501 open(confdir + "releasever", 'w').write(distro_codename if distro_codename is not None else '')
500 502
501 open(oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), 'w').write("") 503 open(oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), 'w').write("")
502 504