[oe-commits] [openembedded-core] 43/43: package_manager.py: set dnf's releasever setting from DISTRO_CODENAME
git at git.openembedded.org
git at git.openembedded.org
Fri Jun 23 10:45:22 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 789e3fc225adbb61f10aaa3bbc3677856f5f0238
Author: Alexander Kanavin <alexander.kanavin at linux.intel.com>
AuthorDate: Wed Jun 21 15:58:21 2017 +0300
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.)
Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/lib/oe/package_manager.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index bc4e301..72503eb 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -494,9 +494,11 @@ class RpmPM(PackageManager):
# This prevents accidental matching against libsolv's built-in policies
if len(archs) <= 1:
archs = archs + ["bogusarch"]
- archconfdir = "%s/%s" %(self.target_rootfs, "etc/dnf/vars/")
- bb.utils.mkdirhier(archconfdir)
- open(archconfdir + "arch", 'w').write(":".join(archs))
+ confdir = "%s/%s" %(self.target_rootfs, "etc/dnf/vars/")
+ bb.utils.mkdirhier(confdir)
+ open(confdir + "arch", 'w').write(":".join(archs))
+ distro_codename = self.d.getVar('DISTRO_CODENAME')
+ open(confdir + "releasever", 'w').write(distro_codename if distro_codename is not None else '')
open(oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), 'w').write("")
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list