From 79d42d2b2f55bbff4e32d0e92ba8b1c047ab3af3 Mon Sep 17 00:00:00 2001 From: Jose Perez Carranza Date: Thu, 30 Nov 2017 10:23:02 -0600 Subject: runtime/dnf: Add new dnf test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- meta/classes/testimage.bbclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'meta/classes') 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): return None def create_rpm_index(d): + import glob # Index RPMs rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c") index_cmds = [] @@ -373,9 +374,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) -- cgit v1.2.3-54-g00ecf