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>
This commit is contained in:
parent
b4a093735c
commit
2bc2e67dd0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue