summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan.Arkver <ian.arkver.dev@gmail.com>2017-04-13 15:42:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-14 09:47:08 +0100
commit2bc2e67dd02cc0a63573d85a0549ccfd06852d1e (patch)
treeb5f567c110caaf50f1f4cd045eec159d9f1dbc6b
parentb4a093735c9251e8c2382386b9e03378c3057c68 (diff)
downloadpoky-2bc2e67dd02cc0a63573d85a0549ccfd06852d1e.tar.gz
package_manager.py: Generate separate repo entries per arch
dnf requires a serparate repo for each architecture. This patch writes one config file per PACKAGE_FEED_URIS entry with an entry for each architecture, if any. It also uses a space separated version of the repo id as the repo name instead of just the id again. (From OE-Core rev: 3eed822b5c5661aa9f43af6582c1481bacf0d39a) Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/package_manager.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 5a189cff97..60d6e52a58 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -550,12 +550,19 @@ class RpmPM(PackageManager):
550 bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d")) 550 bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d"))
551 remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split()) 551 remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
552 for uri in remote_uris: 552 for uri in remote_uris:
553 repo_name = "oe-remote-repo" + "-".join(urlparse(uri).path.split("/")) 553 repo_base = "oe-remote-repo" + "-".join(urlparse(uri).path.split("/"))
554 if feed_archs is not None: 554 if feed_archs is not None:
555 repo_uris = [uri + "/" + arch for arch in feed_archs.split()] 555 for arch in feed_archs.split():
556 repo_uri = uri + "/" + arch
557 repo_id = "oe-remote-repo" + "-".join(urlparse(repo_uri).path.split("/"))
558 repo_name = "OE Remote Repo:" + " ".join(urlparse(repo_uri).path.split("/"))
559 open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'a').write(
560 "[%s]\nname=%s\nbaseurl=%s\n\n" % (repo_id, repo_name, repo_uri))
556 else: 561 else:
557 repo_uris = [uri] 562 repo_name = "OE Remote Repo:" + " ".join(urlparse(uri).path.split("/"))
558 open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_name + ".repo"), 'w').write("[%s]\nname=%s\nbaseurl=%s\n" % (repo_name, repo_name, " ".join(repo_uris))) 563 repo_uri = uri
564 open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'w').write(
565 "[%s]\nname=%s\nbaseurl=%s\n" % (repo_base, repo_name, repo_uri))
559 566
560 def _prepare_pkg_transaction(self): 567 def _prepare_pkg_transaction(self):
561 os.environ['D'] = self.target_rootfs 568 os.environ['D'] = self.target_rootfs