[meta-filesystems] xfsprogs: Fix host contamination

Submitted by Ovidiu Panait on June 6, 2019, 8:02 a.m. | Patch ID: 162007

Details

Message ID 20190606080226.26730-1-ovidiu.panait@windriver.com
State Accepted
Commit 9fca96ad91ea8ece70d7bace68d04e0542ca7d0e
Headers show

Commit Message

Ovidiu Panait June 6, 2019, 8:02 a.m.
Currently, the following symbolic links point to the host:
$ cd xfsprogs/4.18.0-r0/image
$ find . -type l -iname "lib*" -ls
./usr/lib/libhandle.so -> /lib/libhandle.so
./lib/libhandle.a -> /usr/lib/libhandle.a

This causes a build failure if the files already exist on the host:
ERROR: xfsprogs-4.18.0-r0 do_package_write_rpm: Function failed: BUILDSPEC
...
| NOTE: Creating RPM package for xfsprogs-fsck
| NOTE: Creating RPM package for xfsprogs-mkfs
| NOTE: Creating RPM package for xfsprogs-repair
| NOTE: Creating RPM package for libhandle1
| NOTE: Creating RPM package for xfsprogs-dbg
| NOTE: Creating RPM package for xfsprogs-staticdev
| NOTE: Creating RPM package for libhandle1
| NOTE: Creating RPM package for xfsprogs-doc
| NOTE: Not creating empty RPM package for xfsprogs-locale
| NOTE: Creating RPM package for xfsprogs
| NOTE: Creating RPM package for xfsprogs
| error: line 175: %package -n libhandle1: package libhandle1 already exists
...

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
---
 meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.18.0.bb | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.18.0.bb b/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.18.0.bb
index 0a1bacb93..59c67fda6 100644
--- a/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.18.0.bb
+++ b/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.18.0.bb
@@ -65,4 +65,7 @@  do_install_append() {
         oe_runmake 'DESTDIR=${D}' install-dev
         rm ${D}${libdir}/*.la
         rmdir --ignore-fail-on-non-empty ${D}${libdir}
+
+        ln -sf -r ${D}${libdir}/libhandle.a ${D}${base_libdir}/libhandle.a
+        ln -sf -r ${D}${base_libdir}/libhandle.so ${D}${libdir}/libhandle.so
 }