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> | 2019-02-25 22:27:45 +0000 |
commit | 79d42d2b2f55bbff4e32d0e92ba8b1c047ab3af3 (patch) | |
tree | 566bf09b92275e34b567ca7dd1c525a456c96f23 /meta/classes/testimage.bbclass | |
parent | 4fee712eda7ad3a0f07b8a1daf93c2287a682d76 (diff) | |
download | poky-79d42d2b2f55bbff4e32d0e92ba8b1c047ab3af3.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)
(From OE-Core rev: e1b050f53ece2a31cd6866d2d737d7c67a44cea4)
Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-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 b3ae54d6a4..f60afaa1b2 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass | |||
@@ -357,6 +357,7 @@ def create_index(arg): | |||
357 | return None | 357 | return None |
358 | 358 | ||
359 | def create_rpm_index(d): | 359 | def create_rpm_index(d): |
360 | import glob | ||
360 | # Index RPMs | 361 | # Index RPMs |
361 | rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c") | 362 | rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c") |
362 | index_cmds = [] | 363 | index_cmds = [] |
@@ -373,9 +374,13 @@ def create_rpm_index(d): | |||
373 | lf = bb.utils.lockfile(lockfilename, False) | 374 | lf = bb.utils.lockfile(lockfilename, False) |
374 | oe.path.copyhardlinktree(rpm_dir, idx_path) | 375 | oe.path.copyhardlinktree(rpm_dir, idx_path) |
375 | # Full indexes overload a 256MB image so reduce the number of rpms | 376 | # Full indexes overload a 256MB image so reduce the number of rpms |
376 | # in the feed. Filter to r* since we use the run-postinst packages and | 377 | # in the feed by filtering to specific packages needed by the tests. |
377 | # this leaves some allarch and machine arch packages too. | 378 | package_list = glob.glob(idx_path + "*/*.rpm") |
378 | bb.utils.remove(idx_path + "*/[a-qs-z]*.rpm") | 379 | |
380 | for pkg in package_list: | ||
381 | if not os.path.basename(pkg).startswith(("rpm", "run-postinsts", "busybox", "bash", "update-alternatives", "libc6", "curl", "musl")): | ||
382 | bb.utils.remove(pkg) | ||
383 | |||
379 | bb.utils.unlockfile(lf) | 384 | bb.utils.unlockfile(lf) |
380 | cmd = '%s --update -q %s' % (rpm_createrepo, idx_path) | 385 | cmd = '%s --update -q %s' % (rpm_createrepo, idx_path) |
381 | 386 | ||