diff options
author | Jose Perez Carranza <jose.perez.carranza@linux.intel.com> | 2017-11-30 10:23:02 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-15 10:56:48 +0100 |
commit | cb68e9a2feade1ee05f8c27438b41bdeac55ae3d (patch) | |
tree | b9d0a1d3dd4de69bd0082e127ed0f5d5cdbc3797 /meta/classes | |
parent | 5479654eeaaa0f81bfff54ca49369c87f1658705 (diff) | |
download | poky-cb68e9a2feade1ee05f8c27438b41bdeac55ae3d.tar.gz |
runtime/dnf: Add new dnf test cases
Add test cases to test “exclude” and “installroot“ options, also modify
the logic of filtering packages on the feed to have all the packages
needed by the tests.
[YOCTO #10744]
(From OE-Core rev: 1121806603c6f621d084b692216f3f616a0768dc)
Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/testimage.bbclass | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 77291c22ce..bb688b00d5 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass | |||
@@ -331,6 +331,7 @@ def create_index(arg): | |||
331 | return None | 331 | return None |
332 | 332 | ||
333 | def create_rpm_index(d): | 333 | def create_rpm_index(d): |
334 | import glob | ||
334 | # Index RPMs | 335 | # Index RPMs |
335 | rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c") | 336 | rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c") |
336 | index_cmds = [] | 337 | index_cmds = [] |
@@ -347,9 +348,13 @@ def create_rpm_index(d): | |||
347 | lf = bb.utils.lockfile(lockfilename, False) | 348 | lf = bb.utils.lockfile(lockfilename, False) |
348 | oe.path.copyhardlinktree(rpm_dir, idx_path) | 349 | oe.path.copyhardlinktree(rpm_dir, idx_path) |
349 | # Full indexes overload a 256MB image so reduce the number of rpms | 350 | # Full indexes overload a 256MB image so reduce the number of rpms |
350 | # in the feed. Filter to r* since we use the run-postinst packages and | 351 | # in the feed by filtering to specific packages needed by the tests. |
351 | # this leaves some allarch and machine arch packages too. | 352 | package_list = glob.glob(idx_path + "*/*.rpm") |
352 | bb.utils.remove(idx_path + "*/[a-qs-z]*.rpm") | 353 | |
354 | for pkg in package_list: | ||
355 | if not os.path.basename(pkg).startswith(("rpm", "run-postinsts", "busybox", "bash", "update-alternatives", "libc6", "curl", "musl")): | ||
356 | bb.utils.remove(pkg) | ||
357 | |||
353 | bb.utils.unlockfile(lf) | 358 | bb.utils.unlockfile(lf) |
354 | cmd = '%s --update -q %s' % (rpm_createrepo, idx_path) | 359 | cmd = '%s --update -q %s' % (rpm_createrepo, idx_path) |
355 | 360 | ||