mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 12:32:12 +02:00
zlib: remove historical movement of libz.so to /lib
Historically there's been a split between /lib for early boot and /usr/lib for everything else, but with modern systems this split is meaningless and incomplete. If a minimal system for early boot is needed, it should be a full minimal system in a initramfs. [RP: Fixed up selftest to match] (From OE-Core rev: 990073dfc167354b4af41db83ac46c18b1aa99d5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
fa4b74a5a7
commit
454a0ea700
@@ -47,8 +47,8 @@ class OePkgdataUtilTests(OESelftestTestCase):
|
||||
self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output)
|
||||
|
||||
def test_find_path(self):
|
||||
result = runCmd('oe-pkgdata-util find-path /lib/libz.so.1')
|
||||
self.assertEqual(result.output, 'zlib: /lib/libz.so.1')
|
||||
result = runCmd('oe-pkgdata-util find-path /usr/lib/libz.so.1')
|
||||
self.assertEqual(result.output, 'zlib: /usr/lib/libz.so.1')
|
||||
result = runCmd('oe-pkgdata-util find-path /usr/bin/m4')
|
||||
self.assertEqual(result.output, 'm4: /usr/bin/m4')
|
||||
result = runCmd('oe-pkgdata-util find-path /not/exist', ignore_status=True)
|
||||
@@ -120,8 +120,7 @@ class OePkgdataUtilTests(OESelftestTestCase):
|
||||
curpkg = line.split(':')[0]
|
||||
files[curpkg] = []
|
||||
return files
|
||||
bb_vars = get_bb_vars(['base_libdir', 'libdir', 'includedir', 'mandir'])
|
||||
base_libdir = bb_vars['base_libdir']
|
||||
bb_vars = get_bb_vars(['libdir', 'includedir', 'mandir'])
|
||||
libdir = bb_vars['libdir']
|
||||
includedir = bb_vars['includedir']
|
||||
mandir = bb_vars['mandir']
|
||||
@@ -138,7 +137,7 @@ class OePkgdataUtilTests(OESelftestTestCase):
|
||||
self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" %result.output)
|
||||
self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
|
||||
self.assertGreater(len(files['libz1']), 1)
|
||||
libspec = os.path.join(base_libdir, 'libz.so.1.*')
|
||||
libspec = os.path.join(libdir, 'libz.so.1.*')
|
||||
found = False
|
||||
for fileitem in files['libz1']:
|
||||
if fnmatch.fnmatchcase(fileitem, libspec):
|
||||
|
||||
@@ -39,16 +39,4 @@ do_install_ptest() {
|
||||
install ${B}/examplesh ${D}${PTEST_PATH}
|
||||
}
|
||||
|
||||
# Move zlib shared libraries for target builds to $base_libdir so the library
|
||||
# can be used in early boot before $prefix is mounted.
|
||||
do_install:append:class-target() {
|
||||
if [ ${base_libdir} != ${libdir} ]
|
||||
then
|
||||
mkdir -p ${D}/${base_libdir}
|
||||
mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
|
||||
libname=`readlink ${D}/${libdir}/libz.so`
|
||||
ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname ${D}${libdir}/libz.so
|
||||
fi
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
Reference in New Issue
Block a user