summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/package_manager.py12
-rw-r--r--meta/lib/oeqa/selftest/runtime-test.py7
2 files changed, 18 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index d51609189d..b016bc32dc 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -533,10 +533,20 @@ class RpmPM(PackageManager):
533 bb.utils.unlockfile(lf) 533 bb.utils.unlockfile(lf)
534 534
535 def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs): 535 def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
536 from urllib.parse import urlparse
537
536 if feed_uris == "": 538 if feed_uris == "":
537 return 539 return
538 540
539 raise NotImplementedError("Adding remote dnf feeds not yet supported.") 541 bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d"))
542 remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
543 for uri in remote_uris:
544 repo_name = "oe-remote-repo" + "-".join(urlparse(uri).path.split("/"))
545 if feed_archs is not None:
546 repo_uris = [uri + "/" + arch for arch in feed_archs]
547 else:
548 repo_uris = [uri]
549 open(oe.path.join(self.target_rootfs, "etc", "yum.repos.d", repo_name + ".repo"), 'w').write("[%s]\nbaseurl=%s\n" % (repo_name, " ".join(repo_uris)))
540 550
541 def _prepare_pkg_transaction(self): 551 def _prepare_pkg_transaction(self):
542 os.environ['D'] = self.target_rootfs 552 os.environ['D'] = self.target_rootfs
diff --git a/meta/lib/oeqa/selftest/runtime-test.py b/meta/lib/oeqa/selftest/runtime-test.py
index e8b483d7f8..171a37329f 100644
--- a/meta/lib/oeqa/selftest/runtime-test.py
+++ b/meta/lib/oeqa/selftest/runtime-test.py
@@ -108,14 +108,21 @@ class TestImage(oeSelfTest):
108 Summary: Check install packages functionality for testimage/testexport. 108 Summary: Check install packages functionality for testimage/testexport.
109 Expected: 1. Import tests from a directory other than meta. 109 Expected: 1. Import tests from a directory other than meta.
110 2. Check install/uninstall of socat. 110 2. Check install/uninstall of socat.
111 3. Check that remote package feeds can be accessed
111 Product: oe-core 112 Product: oe-core
112 Author: Mariano Lopez <mariano.lopez@intel.com> 113 Author: Mariano Lopez <mariano.lopez@intel.com>
114 Author: Alexander Kanavin <alexander.kanavin@intel.com>
113 """ 115 """
114 if get_bb_var('DISTRO') == 'poky-tiny': 116 if get_bb_var('DISTRO') == 'poky-tiny':
115 self.skipTest('core-image-full-cmdline not buildable for poky-tiny') 117 self.skipTest('core-image-full-cmdline not buildable for poky-tiny')
116 118
117 features = 'INHERIT += "testimage"\n' 119 features = 'INHERIT += "testimage"\n'
118 features += 'TEST_SUITES = "ping ssh selftest"\n' 120 features += 'TEST_SUITES = "ping ssh selftest"\n'
121 # We don't yet know what the server ip and port will be - they will be patched
122 # in at the start of the on-image test
123 features += 'PACKAGE_FEED_URIS = "http://bogus_ip:bogus_port"\n'
124 features += 'EXTRA_IMAGE_FEATURES += "package-management"\n'
125 features += 'PACKAGE_CLASSES = "package_rpm"'
119 self.write_config(features) 126 self.write_config(features)
120 127
121 # Build core-image-sato and testimage 128 # Build core-image-sato and testimage