]> code.ossystems Code Review - openembedded-core.git/commitdiff
openssl/fontconfig/bzip2: Use relative symlinks instead of absolute ones (using a...
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Feb 2017 16:10:50 +0000 (16:10 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 Feb 2017 10:50:54 +0000 (10:50 +0000)
Absolute path symlinks are a bit of a pain for sstate and the native versions
of these recipes currently contain broken symlinks as a result. There are
only a small number of problematic recipes, at least in OE-Core, namely the
three here.

Rather than trying to make sstate handle this magically, which turns out to
be a harder problem than you'd first realise, simply make the symlinks relative
early in the process and avoid all the problems.

The alternative is adding new complexity to sstate which we could really
do without as without the complexity, you can't always tell where the
absolute symlink is relative to (due to prefixes used for native sstate).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/relative_symlinks.bbclass [new file with mode: 0644]
meta/recipes-connectivity/openssl/openssl.inc
meta/recipes-extended/bzip2/bzip2_1.0.6.bb
meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb

diff --git a/meta/classes/relative_symlinks.bbclass b/meta/classes/relative_symlinks.bbclass
new file mode 100644 (file)
index 0000000..3157737
--- /dev/null
@@ -0,0 +1,5 @@
+do_install[postfuncs] += "install_relative_symlinks"
+
+python install_relative_symlinks () {
+    oe.path.replace_absolute_symlinks(d.getVar('D'), d)
+}
index 5cca019e1dcd547525376be26fbaf01acf2bf09e..fc559256150b6acc59452ec1c66501eb47759ec4 100644 (file)
@@ -30,7 +30,7 @@ export EX_LIBS = "-lgcc -ldl"
 export AS = "${CC} -c"
 EXTRA_OEMAKE = "-e MAKEFLAGS="
 
-inherit pkgconfig siteinfo multilib_header ptest
+inherit pkgconfig siteinfo multilib_header ptest relative_symlinks
 
 PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"
 FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}"
index ef7bc897653d046f4e2d6e21b28f8e317371c15a..0512a75990ed1082a6cb7b8a2427e0dcf310a072 100644 (file)
@@ -25,7 +25,7 @@ PACKAGES =+ "libbz2"
 
 CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
 
-inherit autotools update-alternatives ptest
+inherit autotools update-alternatives ptest relative_symlinks
 
 ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN} = "bunzip2 bzcat"
index 8616154c6161064312741ece54873d4e3920ed98..95b066ce464c82b44f279f34cba59c1de45c3ea4 100644 (file)
@@ -37,7 +37,7 @@ RREPLACES_fontconfig-utils = "libfontconfig-utils"
 RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
 DEBIAN_NOAUTONAME_fontconfig-utils = "1"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig relative_symlinks
 
 FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"