selftest/wic: Improve error message got test_fixed_size
PATCH 1/6 selftest/wic: Improve error message got test_fixed_size
Currently this can fail with a message like 127 != 0 which is unhelpful.
If we remove the ignore_status=False, the debugging from runCmd is much more helpful printing status.output.
Also remove the now unneeded exit code check.
--- meta/lib/oeqa/selftest/cases/wic.py | 2 -- 1 file changed, 2 deletions(-)
meta/lib/oeqa/selftest/cases/wic.py +0 -2
@@ -695,9 +695,7 @@ class Wic2(WicTestCase): # verify partition size with wic res = runCmd("parted -m %s unit mib p 2>/dev/null" % wicimg, - ignore_status=True, native_sysroot=self.native_sysroot) - self.assertEqual(0, res.status) # parse parted output which looks like this: # BYT;\n
Signature · 1 line
2.17.1
PATCH 2/6 selftest/wic: clean up runCmd error code handling
runCmd handles checking exit 0 internally unless specified otherwise and its error messages are much more useful including the failed command output.
Clean up the unneeded 0 exit code checks in the wic tests.
--- meta/lib/oeqa/selftest/cases/wic.py | 192 ++++++++++++---------------- 1 file changed, 82 insertions(+), 110 deletions(-)
meta/lib/oeqa/selftest/cases/wic.py +82 -110
@@ -99,58 +99,58 @@ class Wic(WicTestCase): @OETestID(1552) def test_version(self): """Test wic --version""" - self.assertEqual(0, runCmd('wic --version').status) + runCmd('wic --version') @OETestID(1208) def test_help(self): """Test wic --help and wic -h""" - self.assertEqual(0, runCmd('wic --help').status) - self.assertEqual(0, runCmd('wic -h').status) + runCmd('wic --help') + runCmd('wic -h') @OETestID(1209) def test_createhelp(self): """Test wic create --help""" - self.assertEqual(0, runCmd('wic create --help').status) + runCmd('wic create --help') @OETestID(1210) def test_listhelp(self): """Test wic list --help""" - self.assertEqual(0, runCmd('wic list --help').status) + runCmd('wic list --help') @OETestID(1553) def test_help_create(self): """Test wic help create""" - self.assertEqual(0, runCmd('wic help create').status) + runCmd('wic help create') @OETestID(1554) def test_help_list(self): """Test wic help list""" - self.assertEqual(0, runCmd('wic help list').status) + runCmd('wic help list') @OETestID(1215) def test_help_overview(self): """Test wic help overview""" - self.assertEqual(0, runCmd('wic help overview').status) + runCmd('wic help overview') @OETestID(1216) def test_help_plugins(self): """Test wic help plugins""" - self.assertEqual(0, runCmd('wic help plugins').status) + runCmd('wic help plugins') @OETestID(1217) def test_help_kickstart(self): """Test wic help kickstart""" - self.assertEqual(0, runCmd('wic help kickstart').status) + runCmd('wic help kickstart') @OETestID(1555) def test_list_images(self): """Test wic list images""" - self.assertEqual(0, runCmd('wic list images').status) + runCmd('wic list images') @OETestID(1556) def test_list_source_plugins(self): """Test wic list source-plugins""" - self.assertEqual(0, runCmd('wic list source-plugins').status) + runCmd('wic list source-plugins') @OETestID(1557) def test_listed_images_help(self):
@@ -158,7 +158,7 @@ class Wic(WicTestCase): output = runCmd('wic list images').output imagelist = [line.split()[0] for line in output.splitlines()] for image in imagelist: - self.assertEqual(0, runCmd('wic list %s help' % image).status) + runCmd('wic list %s help' % image) @OETestID(1213) def test_unsupported_subcommand(self):
@@ -174,7 +174,7 @@ class Wic(WicTestCase): def test_build_image_name(self): """Test wic create wictestdisk --image-name=core-image-minimal""" cmd = "wic create wictestdisk --image-name=core-image-minimal -o %s" % self.resultdir - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) @OETestID(1157)
@@ -182,7 +182,7 @@ class Wic(WicTestCase): def test_gpt_image(self): """Test creation of core-image-minimal with gpt table and UUID boot""" cmd = "wic create directdisk-gpt --image-name core-image-minimal -o %s" % self.resultdir - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) @OETestID(1346)
@@ -196,7 +196,7 @@ class Wic(WicTestCase): bitbake('core-image-minimal core-image-minimal-initramfs') self.remove_config(config) cmd = "wic create mkhybridiso --image-name core-image-minimal -o %s" % self.resultdir - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.direct"))) self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.iso")))
@@ -205,7 +205,7 @@ class Wic(WicTestCase): def test_qemux86_directdisk(self): """Test creation of qemux-86-directdisk image""" cmd = "wic create qemux86-directdisk -e core-image-minimal -o %s" % self.resultdir - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) self.assertEqual(1, len(glob(self.resultdir + "qemux86-directdisk-*direct"))) @OETestID(1350)
@@ -213,7 +213,7 @@ class Wic(WicTestCase): def test_mkefidisk(self): """Test creation of mkefidisk image""" cmd = "wic create mkefidisk -e core-image-minimal -o %s" % self.resultdir - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) self.assertEqual(1, len(glob(self.resultdir + "mkefidisk-*direct"))) @OETestID(1385)
@@ -225,7 +225,7 @@ class Wic(WicTestCase): bitbake('core-image-minimal') self.remove_config(config) cmd = "wic create directdisk-bootloader-config -e core-image-minimal -o %s" % self.resultdir - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) self.assertEqual(1, len(glob(self.resultdir + "directdisk-bootloader-config-*direct"))) @OETestID(1560)
@@ -237,7 +237,7 @@ class Wic(WicTestCase): bitbake('core-image-minimal') self.remove_config(config) cmd = "wic create systemd-bootdisk -e core-image-minimal -o %s" % self.resultdir - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) self.assertEqual(1, len(glob(self.resultdir + "systemd-bootdisk-*direct"))) @OETestID(1561)
@@ -246,7 +246,7 @@ class Wic(WicTestCase): cmd = "wic create sdimage-bootpart -e core-image-minimal -o %s" % self.resultdir kimgtype = get_bb_var('KERNEL_IMAGETYPE', 'core-image-minimal') self.write_config('IMAGE_BOOT_FILES = "%s"\n' % kimgtype) - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) self.assertEqual(1, len(glob(self.resultdir + "sdimage-bootpart-*direct"))) @OETestID(1562)
@@ -260,7 +260,7 @@ class Wic(WicTestCase): bitbake('core-image-minimal') self.remove_config(config) cmd = "wic create directdisk -e core-image-minimal" - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) self.assertEqual(1, len(glob("directdisk-*.direct"))) @OETestID(1212)
@@ -273,37 +273,36 @@ class Wic(WicTestCase): 'core-image-minimal')) bbvars = {key.lower(): value for key, value in bb_vars.items()} bbvars['resultdir'] = self.resultdir - status = runCmd("wic create directdisk " + runCmd("wic create directdisk " "-b %(staging_datadir)s " "-k %(deploy_dir_image)s " "-n %(recipe_sysroot_native)s " "-r %(image_rootfs)s " - "-o %(resultdir)s" % bbvars).status - self.assertEqual(0, status) + "-o %(resultdir)s" % bbvars) self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) @OETestID(1264) def test_compress_gzip(self): """Test compressing an image with gzip""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name core-image-minimal " - "-c gzip -o %s" % self.resultdir).status) + "-c gzip -o %s" % self.resultdir) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct.gz"))) @OETestID(1265) def test_compress_bzip2(self): """Test compressing an image with bzip2""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " - "-c bzip2 -o %s" % self.resultdir).status) + "-c bzip2 -o %s" % self.resultdir) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct.bz2"))) @OETestID(1266) def test_compress_xz(self): """Test compressing an image with xz""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " - "--compress-with=xz -o %s" % self.resultdir).status) + "--compress-with=xz -o %s" % self.resultdir) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct.xz"))) @OETestID(1267)
@@ -317,63 +316,62 @@ class Wic(WicTestCase): @OETestID(1558) def test_debug_short(self): """Test -D option""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " - "-D -o %s" % self.resultdir).status) + "-D -o %s" % self.resultdir) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) @OETestID(1658) def test_debug_long(self): """Test --debug option""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " - "--debug -o %s" % self.resultdir).status) + "--debug -o %s" % self.resultdir) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) @OETestID(1563) def test_skip_build_check_short(self): """Test -s option""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " - "-s -o %s" % self.resultdir).status) + "-s -o %s" % self.resultdir) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) @OETestID(1671) def test_skip_build_check_long(self): """Test --skip-build-check option""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " "--skip-build-check " - "--outdir %s" % self.resultdir).status) + "--outdir %s" % self.resultdir) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) @OETestID(1564) def test_build_rootfs_short(self): """Test -f option""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " - "-f -o %s" % self.resultdir).status) + "-f -o %s" % self.resultdir) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) @OETestID(1656) def test_build_rootfs_long(self): """Test --build-rootfs option""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " "--build-rootfs " - "--outdir %s" % self.resultdir).status) + "--outdir %s" % self.resultdir) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) @OETestID(1268) @only_for_arch(['i586', 'i686', 'x86_64']) def test_rootfs_indirect_recipes(self): """Test usage of rootfs plugin with rootfs recipes""" - status = runCmd("wic create directdisk-multi-rootfs " + runCmd("wic create directdisk-multi-rootfs " "--image-name=core-image-minimal " "--rootfs rootfs1=core-image-minimal " "--rootfs rootfs2=core-image-minimal " - "--outdir %s" % self.resultdir).status - self.assertEqual(0, status) + "--outdir %s" % self.resultdir) self.assertEqual(1, len(glob(self.resultdir + "directdisk-multi-rootfs*.direct"))) @OETestID(1269)
@@ -387,14 +385,13 @@ class Wic(WicTestCase): bbvars = {key.lower(): value for key, value in bb_vars.items()} bbvars['wks'] = "directdisk-multi-rootfs" bbvars['resultdir'] = self.resultdir - status = runCmd("wic create %(wks)s " + runCmd("wic create %(wks)s " "--bootimg-dir=%(staging_datadir)s " "--kernel-dir=%(deploy_dir_image)s " "--native-sysroot=%(recipe_sysroot_native)s " "--rootfs-dir rootfs1=%(image_rootfs)s " "--rootfs-dir rootfs2=%(image_rootfs)s " - "--outdir %(resultdir)s" % bbvars).status - self.assertEqual(0, status) + "--outdir %(resultdir)s" % bbvars) self.assertEqual(1, len(glob(self.resultdir + "%(wks)s-*.direct" % bbvars))) @OETestID(1661)
@@ -413,8 +410,8 @@ part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path usr part /usr --source rootfs --ondisk mmcblk0 --fstype=ext4 --rootfs-dir %s/usr part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --rootfs-dir %s/usr""" % (rootfs_dir, rootfs_dir)) - self.assertEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \ - % (wks_file, self.resultdir)).status) + runCmd("wic create %s -e core-image-minimal -o %s" \ + % (wks_file, self.resultdir)) os.remove(wks_file) wicout = glob(self.resultdir + "%s-*direct" % 'temp')
@@ -424,7 +421,6 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r # verify partition size with wic res = runCmd("parted -m %s unit b p 2>/dev/null" % wicimg) - self.assertEqual(0, res.status) # parse parted output which looks like this: # BYT;\n
@@ -440,8 +436,8 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r self.assertEqual(7, len(partln)) start = int(partln[1].rstrip("B")) / 512 length = int(partln[3].rstrip("B")) / 512 - self.assertEqual(0, runCmd("dd if=%s of=%s skip=%d count=%d" % - (wicimg, part_file, start, length)).status) + runCmd("dd if=%s of=%s skip=%d count=%d" % + (wicimg, part_file, start, length)) def extract_files(debugfs_output): """
@@ -465,7 +461,6 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r # /usr. res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % \ os.path.join(self.resultdir, "selftest_img.part1")) - self.assertEqual(0, res.status) files = extract_files(res.output) self.assertIn("etc", files) self.assertNotIn("usr", files)
@@ -474,7 +469,6 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r # directories. res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % \ os.path.join(self.resultdir, "selftest_img.part2")) - self.assertEqual(0, res.status) files = extract_files(res.output) self.assertNotIn("etc", files) self.assertNotIn("usr", files)
@@ -484,7 +478,6 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r # directory, but not the files inside it. res = runCmd("debugfs -R 'ls -p' %s 2>/dev/null" % \ os.path.join(self.resultdir, "selftest_img.part3")) - self.assertEqual(0, res.status) files = extract_files(res.output) self.assertNotIn("etc", files) self.assertNotIn("usr", files)
@@ -492,7 +485,6 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r self.assertIn("bin", files) res = runCmd("debugfs -R 'ls -p bin' %s 2>/dev/null" % \ os.path.join(self.resultdir, "selftest_img.part3")) - self.assertEqual(0, res.status) files = extract_files(res.output) self.assertIn(".", files) self.assertIn("..", files)
@@ -530,8 +522,7 @@ class Wic2(WicTestCase): def test_bmap_short(self): """Test generation of .bmap file -m option""" cmd = "wic create wictestdisk -e core-image-minimal -m -o %s" % self.resultdir - status = runCmd(cmd).status - self.assertEqual(0, status) + runCmd(cmd) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct.bmap")))
@@ -539,8 +530,7 @@ class Wic2(WicTestCase): def test_bmap_long(self): """Test generation of .bmap file --bmap option""" cmd = "wic create wictestdisk -e core-image-minimal --bmap -o %s" % self.resultdir - status = runCmd(cmd).status - self.assertEqual(0, status) + runCmd(cmd) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct.bmap")))
@@ -584,10 +574,10 @@ class Wic2(WicTestCase): imgenvdir = self._get_image_env_path(image) native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools") - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=%s -v %s -n %s -o %s" % (image, imgenvdir, native_sysroot, - self.resultdir)).status) + self.resultdir)) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) @OETestID(1665)
@@ -597,13 +587,13 @@ class Wic2(WicTestCase): imgenvdir = self._get_image_env_path(image) native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools") - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=%s " "--vars %s " "--native-sysroot %s " "--outdir %s" % (image, imgenvdir, native_sysroot, - self.resultdir)).status) + self.resultdir)) self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) @OETestID(1351)
@@ -685,8 +675,8 @@ class Wic2(WicTestCase): """ wkspath, wksname = Wic2._make_fixed_size_wks(200) - self.assertEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \ - % (wkspath, self.resultdir)).status) + runCmd("wic create %s -e core-image-minimal -o %s" \ + % (wkspath, self.resultdir)) os.remove(wkspath) wicout = glob(self.resultdir + "%s-*direct" % wksname) self.assertEqual(1, len(wicout))
@@ -750,7 +740,7 @@ class Wic2(WicTestCase): 'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n']) wks.flush() cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) wksname = os.path.splitext(os.path.basename(wks.name))[0] out = glob(self.resultdir + "%s-*direct" % wksname) self.assertEqual(1, len(out))
@@ -770,7 +760,7 @@ class Wic2(WicTestCase): 'part emptybtrfs --fstype btrfs --size 150M\n']) wks.flush() cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) wksname = os.path.splitext(os.path.basename(wks.name))[0] out = glob(self.resultdir + "%s-*direct" % wksname) self.assertEqual(1, len(out))
@@ -783,7 +773,7 @@ class Wic2(WicTestCase): '--overhead-factor 1.2 --size 100k\n']) wks.flush() cmd = "wic create %s -e core-image-minimal -o %s" % (wks.name, self.resultdir) - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) wksname = os.path.splitext(os.path.basename(wks.name))[0] out = glob(self.resultdir + "%s-*direct" % wksname) self.assertEqual(1, len(out))
@@ -795,7 +785,7 @@ class Wic2(WicTestCase): cmd = "wic create sdimage-bootpart -e %s -o %s" % (img, self.resultdir) config = 'IMAGE_BOOT_FILES = "%s*"' % get_bb_var('KERNEL_IMAGETYPE', img) self.append_config(config) - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) self.remove_config(config) self.assertEqual(1, len(glob(self.resultdir + "sdimage-bootpart-*direct")))
@@ -831,9 +821,9 @@ class Wic2(WicTestCase): @OETestID(1857) def test_wic_ls(self): """Test listing image content using 'wic ls'""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " - "-D -o %s" % self.resultdir).status) + "-D -o %s" % self.resultdir) images = glob(self.resultdir + "wictestdisk-*.direct") self.assertEqual(1, len(images))
@@ -841,20 +831,18 @@ class Wic2(WicTestCase): # list partitions result = runCmd("wic ls %s -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) self.assertEqual(3, len(result.output.split('\n'))) # list directory content of the first partition result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) self.assertEqual(6, len(result.output.split('\n'))) @OETestID(1856) def test_wic_cp(self): """Test copy files and directories to the the wic image.""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " - "-D -o %s" % self.resultdir).status) + "-D -o %s" % self.resultdir) images = glob(self.resultdir + "wictestdisk-*.direct") self.assertEqual(1, len(images))
@@ -862,19 +850,16 @@ class Wic2(WicTestCase): # list directory content of the first partition result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) self.assertEqual(6, len(result.output.split('\n'))) with NamedTemporaryFile("w", suffix=".wic-cp") as testfile: testfile.write("test") # copy file to the partition - result = runCmd("wic cp %s %s:1/ -n %s" % (testfile.name, images[0], sysroot)) - self.assertEqual(0, result.status) + runCmd("wic cp %s %s:1/ -n %s" % (testfile.name, images[0], sysroot)) # check if file is there result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) self.assertEqual(7, len(result.output.split('\n'))) self.assertTrue(os.path.basename(testfile.name) in result.output)
@@ -885,21 +870,19 @@ class Wic2(WicTestCase): copy(testfile.name, testdir) # copy directory to the partition - result = runCmd("wic cp %s %s:1/ -n %s" % (testdir, images[0], sysroot)) - self.assertEqual(0, result.status) + runCmd("wic cp %s %s:1/ -n %s" % (testdir, images[0], sysroot)) # check if directory is there result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) self.assertEqual(8, len(result.output.split('\n'))) self.assertTrue(os.path.basename(testdir) in result.output) @OETestID(1858) def test_wic_rm(self): """Test removing files and directories from the the wic image.""" - self.assertEqual(0, runCmd("wic create mkefidisk " + runCmd("wic create mkefidisk " "--image-name=core-image-minimal " - "-D -o %s" % self.resultdir).status) + "-D -o %s" % self.resultdir) images = glob(self.resultdir + "mkefidisk-*.direct") self.assertEqual(1, len(images))
@@ -907,21 +890,17 @@ class Wic2(WicTestCase): # list directory content of the first partition result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) self.assertIn('\nBZIMAGE ', result.output) self.assertIn('\nEFI <DIR> ', result.output) # remove file - result = runCmd("wic rm %s:1/bzimage -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) + runCmd("wic rm %s:1/bzimage -n %s" % (images[0], sysroot)) # remove directory - result = runCmd("wic rm %s:1/efi -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) + runCmd("wic rm %s:1/efi -n %s" % (images[0], sysroot)) # check if they're removed result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) self.assertNotIn('\nBZIMAGE ', result.output) self.assertNotIn('\nEFI <DIR> ', result.output)
@@ -940,7 +919,7 @@ class Wic2(WicTestCase): 'part emptybtrfs --fstype btrfs --size 100M --mkfs-extraopts "--mixed -K"\n']) wks.flush() cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) wksname = os.path.splitext(os.path.basename(wks.name))[0] out = glob(self.resultdir + "%s-*direct" % wksname) self.assertEqual(1, len(out))
@@ -970,7 +949,7 @@ class Wic2(WicTestCase): sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') cmd = "wic write -n %s --expand 1:0 %s %s" % (sysroot, image_path, new_image_path) - self.assertEqual(0, runCmd(cmd).status) + runCmd(cmd) # check if partitions are expanded orig = runCmd("wic ls %s -n %s" % (image_path, sysroot))
@@ -1000,9 +979,9 @@ class Wic2(WicTestCase): def test_wic_ls_ext(self): """Test listing content of the ext partition using 'wic ls'""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " - "-D -o %s" % self.resultdir).status) + "-D -o %s" % self.resultdir) images = glob(self.resultdir + "wictestdisk-*.direct") self.assertEqual(1, len(images))
@@ -1010,15 +989,14 @@ class Wic2(WicTestCase): # list directory content of the second ext4 partition result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) self.assertTrue(set(['bin', 'home', 'proc', 'usr', 'var', 'dev', 'lib', 'sbin']).issubset( set(line.split()[-1] for line in result.output.split('\n') if line))) def test_wic_cp_ext(self): """Test copy files and directories to the ext partition.""" - self.assertEqual(0, runCmd("wic create wictestdisk " + runCmd("wic create wictestdisk " "--image-name=core-image-minimal " - "-D -o %s" % self.resultdir).status) + "-D -o %s" % self.resultdir) images = glob(self.resultdir + "wictestdisk-*.direct") self.assertEqual(1, len(images))
@@ -1026,7 +1004,6 @@ class Wic2(WicTestCase): # list directory content of the ext4 partition result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) dirs = set(line.split()[-1] for line in result.output.split('\n') if line) self.assertTrue(set(['bin', 'home', 'proc', 'usr', 'var', 'dev', 'lib', 'sbin']).issubset(dirs))
@@ -1034,20 +1011,18 @@ class Wic2(WicTestCase): testfile.write("test") # copy file to the partition - result = runCmd("wic cp %s %s:2/ -n %s" % (testfile.name, images[0], sysroot)) - self.assertEqual(0, result.status) + runCmd("wic cp %s %s:2/ -n %s" % (testfile.name, images[0], sysroot)) # check if file is there result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) newdirs = set(line.split()[-1] for line in result.output.split('\n') if line) self.assertEqual(newdirs.difference(dirs), set([os.path.basename(testfile.name)])) def test_wic_rm_ext(self): """Test removing files from the ext partition.""" - self.assertEqual(0, runCmd("wic create mkefidisk " + runCmd("wic create mkefidisk " "--image-name=core-image-minimal " - "-D -o %s" % self.resultdir).status) + "-D -o %s" % self.resultdir) images = glob(self.resultdir + "mkefidisk-*.direct") self.assertEqual(1, len(images))
@@ -1055,14 +1030,11 @@ class Wic2(WicTestCase): # list directory content of the /etc directory on ext4 partition result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) self.assertTrue('fstab' in [line.split()[-1] for line in result.output.split('\n') if line]) # remove file - result = runCmd("wic rm %s:2/etc/fstab -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) + runCmd("wic rm %s:2/etc/fstab -n %s" % (images[0], sysroot)) # check if it's removed result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot)) - self.assertEqual(0, result.status) self.assertTrue('fstab' not in [line.split()[-1] for line in result.output.split('\n') if line])
Signature · 1 line
2.17.1
PATCH 3/6 package: Use subprocess to be consistent with the rest of the class
In reply to Richard PurdieUsing 'sub' in one function just confuses things, standardise and fix formatting of the parameters too.
--- meta/classes/package.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
meta/classes/package.bbclass +4 -4
@@ -1575,7 +1575,7 @@ SHLIBSWORKDIR = "${PKGDESTWORK}/${MLPREFIX}shlibs2" python package_do_shlibs() { import re, pipes - import subprocess as sub + import subprocess exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', False) if exclude_shlibs:
@@ -1677,7 +1677,7 @@ python package_do_shlibs() { sonames.add(prov) if file.endswith('.dylib') or file.endswith('.so'): rpath = [] - p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file],stdout=sub.PIPE,stderr=sub.PIPE) + p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() # If returned successfully, process stdout for results if p.returncode == 0:
@@ -1686,7 +1686,7 @@ python package_do_shlibs() { if l.startswith('path '): rpath.append(l.split()[1]) - p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file],stdout=sub.PIPE,stderr=sub.PIPE) + p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() # If returned successfully, process stdout for results if p.returncode == 0:
@@ -1710,7 +1710,7 @@ python package_do_shlibs() { if (file.endswith(".dll") or file.endswith(".exe")): # use objdump to search for "DLL Name: .*\.dll" - p = sub.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], stdout = sub.PIPE, stderr= sub.PIPE) + p = subprocess.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() # process the output, grabbing all .dll names if p.returncode == 0:
Signature · 1 line
2.17.1
PATCH 4/6 license: Split image license functions to a separate class
In reply to Richard PurdieThis means the image code is only included in image recipes through the IMAGE_CLASSES variable.
This sets things up to allow us to fix image deploy dependency problems.
--- meta/classes/license.bbclass | 284 +---------------------------- meta/classes/license_image.bbclass | 284 +++++++++++++++++++++++++++++ 2 files changed, 285 insertions(+), 283 deletions(-) create mode 100644 meta/classes/license_image.bbclass
meta/classes/license.bbclass +1 -283
@@ -16,284 +16,6 @@ addtask populate_lic after do_patch before do_build do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" do_populate_lic[cleandirs] = "${LICSSTATEDIR}" -python write_package_manifest() { - # Get list of installed packages - license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}') - bb.utils.mkdirhier(license_image_dir) - from oe.rootfs import image_list_installed_packages - from oe.utils import format_pkg_list - - pkgs = image_list_installed_packages(d) - output = format_pkg_list(pkgs) - open(os.path.join(license_image_dir, 'package.manifest'), - 'w+').write(output) -} - -python write_deploy_manifest() { - license_deployed_manifest(d) -} - -python license_create_manifest() { - import oe.packagedata - from oe.rootfs import image_list_installed_packages - - build_images_from_feeds = d.getVar('BUILD_IMAGES_FROM_FEEDS') - if build_images_from_feeds == "1": - return 0 - - pkg_dic = {} - for pkg in sorted(image_list_installed_packages(d)): - pkg_info = os.path.join(d.getVar('PKGDATA_DIR'), - 'runtime-reverse', pkg) - pkg_name = os.path.basename(os.readlink(pkg_info)) - - pkg_dic[pkg_name] = oe.packagedata.read_pkgdatafile(pkg_info) - if not "LICENSE" in pkg_dic[pkg_name].keys(): - pkg_lic_name = "LICENSE_" + pkg_name - pkg_dic[pkg_name]["LICENSE"] = pkg_dic[pkg_name][pkg_lic_name] - - rootfs_license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY'), - d.getVar('IMAGE_NAME'), 'license.manifest') - write_license_files(d, rootfs_license_manifest, pkg_dic) -} - -def write_license_files(d, license_manifest, pkg_dic): - import re - - bad_licenses = (d.getVar("INCOMPATIBLE_LICENSE") or "").split() - bad_licenses = map(lambda l: canonical_license(d, l), bad_licenses) - bad_licenses = expand_wildcard_licenses(d, bad_licenses) - - with open(license_manifest, "w") as license_file: - for pkg in sorted(pkg_dic): - if bad_licenses: - try: - (pkg_dic[pkg]["LICENSE"], pkg_dic[pkg]["LICENSES"]) = \ - oe.license.manifest_licenses(pkg_dic[pkg]["LICENSE"], - bad_licenses, canonical_license, d) - except oe.license.LicenseError as exc: - bb.fatal('%s: %s' % (d.getVar('P'), exc)) - else: - pkg_dic[pkg]["LICENSES"] = re.sub('[|&()*]', ' ', pkg_dic[pkg]["LICENSE"]) - pkg_dic[pkg]["LICENSES"] = re.sub(' *', ' ', pkg_dic[pkg]["LICENSES"]) - pkg_dic[pkg]["LICENSES"] = pkg_dic[pkg]["LICENSES"].split() - - if not "IMAGE_MANIFEST" in pkg_dic[pkg]: - # Rootfs manifest - license_file.write("PACKAGE NAME: %s\n" % pkg) - license_file.write("PACKAGE VERSION: %s\n" % pkg_dic[pkg]["PV"]) - license_file.write("RECIPE NAME: %s\n" % pkg_dic[pkg]["PN"]) - license_file.write("LICENSE: %s\n\n" % pkg_dic[pkg]["LICENSE"]) - - # If the package doesn't contain any file, that is, its size is 0, the license - # isn't relevant as far as the final image is concerned. So doing license check - # doesn't make much sense, skip it. - if pkg_dic[pkg]["PKGSIZE_%s" % pkg] == "0": - continue - else: - # Image manifest - license_file.write("RECIPE NAME: %s\n" % pkg_dic[pkg]["PN"]) - license_file.write("VERSION: %s\n" % pkg_dic[pkg]["PV"]) - license_file.write("LICENSE: %s\n" % pkg_dic[pkg]["LICENSE"]) - license_file.write("FILES: %s\n\n" % pkg_dic[pkg]["FILES"]) - - for lic in pkg_dic[pkg]["LICENSES"]: - lic_file = os.path.join(d.getVar('LICENSE_DIRECTORY'), - pkg_dic[pkg]["PN"], "generic_%s" % - re.sub('\+', '', lic)) - # add explicity avoid of CLOSED license because isn't generic - if lic == "CLOSED": - continue - - if not os.path.exists(lic_file): - bb.warn("The license listed %s was not in the "\ - "licenses collected for recipe %s" - % (lic, pkg_dic[pkg]["PN"])) - - # Two options here: - # - Just copy the manifest - # - Copy the manifest and the license directories - # With both options set we see a .5 M increase in core-image-minimal - copy_lic_manifest = d.getVar('COPY_LIC_MANIFEST') - copy_lic_dirs = d.getVar('COPY_LIC_DIRS') - if copy_lic_manifest == "1": - rootfs_license_dir = os.path.join(d.getVar('IMAGE_ROOTFS'), - 'usr', 'share', 'common-licenses') - bb.utils.mkdirhier(rootfs_license_dir) - rootfs_license_manifest = os.path.join(rootfs_license_dir, - os.path.split(license_manifest)[1]) - if not os.path.exists(rootfs_license_manifest): - os.link(license_manifest, rootfs_license_manifest) - - if copy_lic_dirs == "1": - for pkg in sorted(pkg_dic): - pkg_rootfs_license_dir = os.path.join(rootfs_license_dir, pkg) - bb.utils.mkdirhier(pkg_rootfs_license_dir) - pkg_license_dir = os.path.join(d.getVar('LICENSE_DIRECTORY'), - pkg_dic[pkg]["PN"]) - - pkg_manifest_licenses = [canonical_license(d, lic) \ - for lic in pkg_dic[pkg]["LICENSES"]] - - licenses = os.listdir(pkg_license_dir) - for lic in licenses: - rootfs_license = os.path.join(rootfs_license_dir, lic) - pkg_license = os.path.join(pkg_license_dir, lic) - pkg_rootfs_license = os.path.join(pkg_rootfs_license_dir, lic) - - if re.match("^generic_.*$", lic): - generic_lic = canonical_license(d, - re.search("^generic_(.*)$", lic).group(1)) - - # Do not copy generic license into package if isn't - # declared into LICENSES of the package. - if not re.sub('\+$', '', generic_lic) in \ - [re.sub('\+', '', lic) for lic in \ - pkg_manifest_licenses]: - continue - - if oe.license.license_ok(generic_lic, - bad_licenses) == False: - continue - - if not os.path.exists(rootfs_license): - os.link(pkg_license, rootfs_license) - - if not os.path.exists(pkg_rootfs_license): - os.symlink(os.path.join('..', lic), pkg_rootfs_license) - else: - if (oe.license.license_ok(canonical_license(d, - lic), bad_licenses) == False or - os.path.exists(pkg_rootfs_license)): - continue - - os.link(pkg_license, pkg_rootfs_license) - - -def license_deployed_manifest(d): - """ - Write the license manifest for the deployed recipes. - The deployed recipes usually includes the bootloader - and extra files to boot the target. - """ - - dep_dic = {} - man_dic = {} - lic_dir = d.getVar("LICENSE_DIRECTORY") - - dep_dic = get_deployed_dependencies(d) - for dep in dep_dic.keys(): - man_dic[dep] = {} - # It is necessary to mark this will be used for image manifest - man_dic[dep]["IMAGE_MANIFEST"] = True - man_dic[dep]["PN"] = dep - man_dic[dep]["FILES"] = \ - " ".join(get_deployed_files(dep_dic[dep])) - with open(os.path.join(lic_dir, dep, "recipeinfo"), "r") as f: - for line in f.readlines(): - key,val = line.split(": ", 1) - man_dic[dep][key] = val[:-1] - - lic_manifest_dir = os.path.join(d.getVar('LICENSE_DIRECTORY'), - d.getVar('IMAGE_NAME')) - bb.utils.mkdirhier(lic_manifest_dir) - image_license_manifest = os.path.join(lic_manifest_dir, 'image_license.manifest') - write_license_files(d, image_license_manifest, man_dic) - -def get_deployed_dependencies(d): - """ - Get all the deployed dependencies of an image - """ - - deploy = {} - # Get all the dependencies for the current task (rootfs). - # Also get EXTRA_IMAGEDEPENDS because the bootloader is - # usually in this var and not listed in rootfs. - # At last, get the dependencies from boot classes because - # it might contain the bootloader. - taskdata = d.getVar("BB_TASKDEPDATA", False) - depends = list(set([dep[0] for dep - in list(taskdata.values()) - if not dep[0].endswith("-native")])) - extra_depends = d.getVar("EXTRA_IMAGEDEPENDS") - boot_depends = get_boot_dependencies(d) - depends.extend(extra_depends.split()) - depends.extend(boot_depends) - depends = list(set(depends)) - - # To verify what was deployed it checks the rootfs dependencies against - # the SSTATE_MANIFESTS for "deploy" task. - # The manifest file name contains the arch. Because we are not running - # in the recipe context it is necessary to check every arch used. - sstate_manifest_dir = d.getVar("SSTATE_MANIFESTS") - archs = list(set(d.getVar("SSTATE_ARCHS").split())) - for dep in depends: - # Some recipes have an arch on their own, so we try that first. - special_arch = d.getVar("PACKAGE_ARCH_pn-%s" % dep) - if special_arch: - sstate_manifest_file = os.path.join(sstate_manifest_dir, - "manifest-%s-%s.deploy" % (special_arch, dep)) - if os.path.exists(sstate_manifest_file): - deploy[dep] = sstate_manifest_file - continue - - for arch in archs: - sstate_manifest_file = os.path.join(sstate_manifest_dir, - "manifest-%s-%s.deploy" % (arch, dep)) - if os.path.exists(sstate_manifest_file): - deploy[dep] = sstate_manifest_file - break - - return deploy -get_deployed_dependencies[vardepsexclude] = "BB_TASKDEPDATA" - -def get_boot_dependencies(d): - """ - Return the dependencies from boot tasks - """ - - depends = [] - taskdepdata = d.getVar("BB_TASKDEPDATA", False) - # Only bootimg includes the depends flag - boot_depends_string = d.getVarFlag("do_bootimg", "depends") or "" - boot_depends = [dep.split(":")[0] for dep - in boot_depends_string.split() - if not dep.split(":")[0].endswith("-native")] - for dep in boot_depends: - info_file = os.path.join(d.getVar("LICENSE_DIRECTORY"), - dep, "recipeinfo") - # If the recipe and dependency name is the same - if os.path.exists(info_file): - depends.append(dep) - # We need to search for the provider of the dependency - else: - for taskdep in taskdepdata.values(): - # The fifth field contains what the task provides - if dep in taskdep[4]: - info_file = os.path.join( - d.getVar("LICENSE_DIRECTORY"), - taskdep[0], "recipeinfo") - if os.path.exists(info_file): - depends.append(taskdep[0]) - break - return depends -get_boot_dependencies[vardepsexclude] = "BB_TASKDEPDATA" - -def get_deployed_files(man_file): - """ - Get the files deployed from the sstate manifest - """ - - dep_files = [] - excluded_files = [] - with open(man_file, "r") as manifest: - all_files = manifest.read() - for f in all_files.splitlines(): - if ((not (os.path.islink(f) or os.path.isdir(f))) and - not os.path.basename(f) in excluded_files): - dep_files.append(os.path.basename(f)) - return dep_files - python do_populate_lic() { """ Populate LICENSE_DIRECTORY with licenses.
@@ -675,11 +397,7 @@ SSTATETASKS += "do_populate_lic" do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}" do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/" -ROOTFS_POSTPROCESS_COMMAND_prepend = "write_package_manifest; license_create_manifest; " -do_rootfs[recrdeptask] += "do_populate_lic" - -IMAGE_POSTPROCESS_COMMAND_prepend = "write_deploy_manifest; " -do_image[recrdeptask] += "do_populate_lic" +IMAGE_CLASSES_append = " license_image" python do_populate_lic_setscene () { sstate_setscene(d)
meta/classes/license_image.bbclass new file +284 -0
284 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 5/6 license_image: Fix race
In reply to Richard PurdieThe current code pokes into do_deploy manifests from do_image_complete when the do_image_complete task may or may not depend upon the do_deploy tasks in question. Often it gets lucky, sometimes it results in build failures.
To fix this, split the functionality to its own task which can have the correct task dependencies. This means the data in BB_TASKDEPDATA is definitive, the other code can be dropped, as can the IMAGE_EXTRATYPES do_populate_lic dependencies from image.bbclass.
This fixes bugs which show up as:
NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Started
ERROR: core-image-minimal-1.0-r0 do_image_complete: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:write_deploy_manifest(d)
0003:
File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 33, function: write_deploy_manifest
0029: 'w+').write(output)
0030:}
0031:
0032:python write_deploy_manifest() {
*** 0033: license_deployed_manifest(d)
0034:}
0035:
0036:python license_create_manifest() {
0037: import oe.packagedata
File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 191, function: license_deployed_manifest
0187: # It is necessary to mark this will be used for image manifest
0188: man_dic[dep]["IMAGE_MANIFEST"] = True
0189: man_dic[dep]["PN"] = dep
0190: man_dic[dep]["FILES"] = \
*** 0191: " ".join(get_deployed_files(dep_dic[dep]))
0192: with open(os.path.join(lic_dir, dep, "recipeinfo"), "r") as f:
0193: for line in f.readlines():
0194: key,val = line.split(": ", 1)
0195: man_dic[dep][key] = val[:-1]
File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 289, function: get_deployed_files
0285: """
0286:
0287: dep_files = []
0288: excluded_files = [] *** 0289: with open(man_file, "r") as manifest:
0290: all_files = manifest.read()
0291: for f in all_files.splitlines():
0292: if ((not (os.path.islink(f) or os.path.isdir(f))) and
0293: not os.path.basename(f) in excluded_files):
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/sstate-control/manifest-qemux86_64-linux-yocto.deploy'
ERROR: core-image-minimal-1.0-r0 do_image_complete: Function failed: write_deploy_manifest
ERROR: Logfile of failure stored in: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_complete.50537
NOTE: recipe core-image-minimal-1.0-r0: task do_image_complete: Failed
ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/recipes-core/images/core-image-minimal.bb:do_image_complete) failed with exit code '1'
NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Succeeded
--- meta/classes/image.bbclass | 1 - meta/classes/license_image.bbclass | 58 ++++-------------------------- 2 files changed, 6 insertions(+), 53 deletions(-)
meta/classes/image.bbclass +0 -1
@@ -141,7 +141,6 @@ python () { deps += " %s:%s" % (dep, task) return deps - d.appendVarFlag('do_image', 'depends', extraimage_getdepends('do_populate_lic')) d.appendVarFlag('do_image_complete', 'depends', extraimage_getdepends('do_populate_sysroot')) deps = " " + imagetypes_getdepends(d)
meta/classes/license_image.bbclass +6 -52
86 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 6/6 uninative-tarball: Add nativesdk-libnss-nis to resolve glibc symbol issues
In reply to Richard PurdieWe need this to avoid symbol mismatch issues for binaries that use this on newer systems which then won't run on older ones where it isn't present.
--- meta/recipes-core/meta/uninative-tarball.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/meta/uninative-tarball.bb +1 -0
@@ -16,6 +16,7 @@ TOOLCHAIN_HOST_TASK = "\ nativesdk-glibc-gconv-libjis \ nativesdk-patchelf \ nativesdk-libxcrypt \ + nativesdk-libnss-nis \ " INHIBIT_DEFAULT_DEPS = "1"
Signature · 1 line
2.17.1