UBUNTU: [Packaging] Check do_lib_rust before linking Rust lib files

BugLink: https://bugs.launchpad.net/bugs/2072592

Packages with falsy do_lib_rust still try to symlink the lib-rust
package even though do_lib_rust prevents it from being generated. This
results in a bad symlink in the headers (rust -> ../linux-lib-rust). It
should check do_lib_rust before trying to link that directory.

Signed-off-by: Noah Wager <noah.wager@canonical.com>
Acked-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Agathe Porte <agathe.porte@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
Noah Wager
2024-07-19 00:24:00 +02:00
committed by Roxana Nicolescu
parent d0f6ea926c
commit 7415dcccfe
+2
View File
@@ -485,11 +485,13 @@ endif
# Strip .so files (e.g., rust/libmacros.so) to reduce size even more
find $(hdrdir) -name libmacros.so -exec strip -s {} \;
ifeq ($(do_lib_rust),true)
# Generate Rust lib files
install -d -m755 $(rustdir)
mv $(hdrdir)/rust $(rustdir)
# Generate symlink for Rust lib directory in headers
$(SHELL) $(DROOT)/scripts/link-lib-rust "$(hdrdir)" "$(indeppkg)" "$*"
endif
ifneq ($(do_full_build),false)
# Clean out this flavours build directory.