summaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
diff options
context:
space:
mode:
authorJose Perez Carranza <jose.perez.carranza@linux.intel.com>2017-11-30 10:23:02 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-14 14:08:56 +0100
commit1121806603c6f621d084b692216f3f616a0768dc (patch)
treecd11c938472f755f87a24a015c4586103bfa97a6 /meta/classes/testimage.bbclass
parentf04e6bd144deb0c8fe2742f66b18904b6619a502 (diff)
downloadopenembedded-core-contrib-1121806603c6f621d084b692216f3f616a0768dc.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] 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/testimage.bbclass')
-rw-r--r--meta/classes/testimage.bbclass11
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):
return None
def create_rpm_index(d):
+ import glob
# Index RPMs
rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c")
index_cmds = []
@@ -347,9 +348,13 @@ def create_rpm_index(d):
lf = bb.utils.lockfile(lockfilename, False)
oe.path.copyhardlinktree(rpm_dir, idx_path)
# Full indexes overload a 256MB image so reduce the number of rpms
- # in the feed. Filter to r* since we use the run-postinst packages and
- # this leaves some allarch and machine arch packages too.
- bb.utils.remove(idx_path + "*/[a-qs-z]*.rpm")
+ # in the feed by filtering to specific packages needed by the tests.
+ package_list = glob.glob(idx_path + "*/*.rpm")
+
+ for pkg in package_list:
+ if not os.path.basename(pkg).startswith(("rpm", "run-postinsts", "busybox", "bash", "update-alternatives", "libc6", "curl", "musl")):
+ bb.utils.remove(pkg)
+
bb.utils.unlockfile(lf)
cmd = '%s --update -q %s' % (rpm_createrepo, idx_path)