diff --git a/etc/config b/etc/config index fb492ccb8..11b71b226 100755 --- a/etc/config +++ b/etc/config @@ -16,6 +16,7 @@ export DIALOGRC=/etc/lunar/dialogrc DEFAULT_PREFIX=/usr OBSOLETE_LIB_DIR=/usr/lib/lunar/OBSOLETE + OBSOLETE_LD_CONF=/etc/ld.so.conf.d/obsolete-libs.conf BOOTSTRAP=/var/lib/lunar/bootstrap EXCLUDED=/var/lib/lunar/excluded diff --git a/libs/build.lunar b/libs/build.lunar index 776602de5..ae16353b0 100644 --- a/libs/build.lunar +++ b/libs/build.lunar @@ -92,6 +92,10 @@ save_obsolete_libraries() { mkdir -p "$OBSOLETE_LIB_DIR" fi + if [[ -d "/etc/ld.so.conf.d" && ! -f "$OBSOLETE_LD_CONF" ]]; then + echo "/usr/lib/lunar/OBSOLETE" > $OBSOLETE_LD_CONF + fi + for f in $(ls -1 $OLD_LIBS/*.so* 2> /dev/null); do LIB=$(basename $f) if ! parse_iw | grep -q $LIB; then @@ -108,6 +112,7 @@ remove_obsolete_libraries() { debug_msg "remove_obsolete_libraries($@)" verbose_msg "Removing OBSOLETE libraries" rm -rf "$OBSOLETE_LIB_DIR" + rm -f "$OBSOLETE_LD_CONF" ldconfig }