summaryrefslogtreecommitdiff
path: root/meta/lib
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-13 23:57:38 +0100
commit3eed822b5c5661aa9f43af6582c1481bacf0d39a (patch)
tree4680f633203f785d15071bc5162675599f0a5ca6 /meta/lib
parent67bce43ef15bf641f1b1153a0408c4dc841ae8d6 (diff)
downloadopenembedded-core-3eed822b5c5661aa9f43af6582c1481bacf0d39a.tar.gz
openembedded-core-3eed822b5c5661aa9f43af6582c1481bacf0d39a.tar.bz2
openembedded-core-3eed822b5c5661aa9f43af6582c1481bacf0d39a.zip
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. Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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):
bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d"))
remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
for uri in remote_uris:
- repo_name = "oe-remote-repo" + "-".join(urlparse(uri).path.split("/"))
+ repo_base = "oe-remote-repo" + "-".join(urlparse(uri).path.split("/"))
if feed_archs is not None:
- repo_uris = [uri + "/" + arch for arch in feed_archs.split()]
+ for arch in feed_archs.split():
+ repo_uri = uri + "/" + arch
+ repo_id = "oe-remote-repo" + "-".join(urlparse(repo_uri).path.split("/"))
+ repo_name = "OE Remote Repo:" + " ".join(urlparse(repo_uri).path.split("/"))
+ open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'a').write(
+ "[%s]\nname=%s\nbaseurl=%s\n\n" % (repo_id, repo_name, repo_uri))
else:
- repo_uris = [uri]
- 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)))
+ repo_name = "OE Remote Repo:" + " ".join(urlparse(uri).path.split("/"))
+ repo_uri = uri
+ open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_base + ".repo"), 'w').write(
+ "[%s]\nname=%s\nbaseurl=%s\n" % (repo_base, repo_name, repo_uri))
def _prepare_pkg_transaction(self):
os.environ['D'] = self.target_rootfs