tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
postinstall(8) update to cleanup obsolete .debug libs
Hi,
The attached patch add support for postinstall(8) to cleanup obsolete
.debug libraries, using the existing libraries cleanup mecanism.
This catch a few stale files on my -current amd64 machine :
njoly@lanfeust [NetBSD/src]> ./usr.sbin/postinstall/postinstall -s . -d / check
obsolete
Source directory: .
Target directory: /
obsolete check:
Remove obsolete file /usr/libdata/debug/usr/lib/libc.so.12.172.debug
Remove obsolete file /usr/libdata/debug/usr/lib/libc.so.12.173.debug
Remove obsolete file
/usr/libdata/debug/usr/X11R7/lib/libdrm.so.3.1.debug
Remove obsolete file
/usr/libdata/debug/usr/X11R7/lib/libfreetype.so.7.1.debug
Remove obsolete file
/usr/libdata/debug/usr/X11R7/lib/libpciaccess.so.0.1.debug
Remove obsolete file
/usr/libdata/debug/usr/X11R7/lib/libpixman-1.so.2.0.debug
Remove obsolete file
/usr/libdata/debug/usr/lib/i386/libc.so.12.172.debug
Remove obsolete file
/usr/libdata/debug/usr/lib/i386/libc.so.12.173.debug
postinstall checks passed:
postinstall checks failed: obsolete
To fix, run:
./usr.sbin/postinstall/postinstall -s '.' -d / fix obsolete
Note that this may overwrite local changes.
Does it looks ok ?
Thanks.
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.
Index: usr.sbin/postinstall/postinstall
===================================================================
RCS file: /cvsroot/src/usr.sbin/postinstall/postinstall,v
retrieving revision 1.110
diff -u -p -r1.110 postinstall
--- usr.sbin/postinstall/postinstall 21 Nov 2010 22:50:37 -0000 1.110
+++ usr.sbin/postinstall/postinstall 26 Nov 2010 15:52:40 -0000
@@ -522,7 +522,7 @@ function checklib(results, line, regex)
}
}
-/^lib.*\.so\.[0-9]+\.[0-9]+(\.[0-9]+)?$/ {
+/^lib.*\.so\.[0-9]+\.[0-9]+(\.[0-9]+)?(\.debug)?$/ {
if (AllLibs)
checklib(minor, $0, "^lib.*\\.so\\.")
else
@@ -1460,6 +1460,15 @@ do_obsolete()
obsolete_libs /usr/X11R7/lib
[ "$MACHINE" = "amd64" ] && obsolete_libs /usr/lib/i386
[ "$MACHINE" = "sparc64" ] && obsolete_libs /usr/lib/sparc
+
+ obsolete_libs /usr/libdata/debug/usr/lib
+ obsolete_libs /usr/libdata/debug/usr/lib/i18n
+ obsolete_libs /usr/libdata/debug/usr/X11R6/lib
+ obsolete_libs /usr/libdata/debug/usr/X11R7/lib
+ [ "$MACHINE" = "amd64" ] && \
+ obsolete_libs /usr/libdata/debug/usr/lib/i386
+ [ "$MACHINE" = "sparc64" ] && \
+ obsolete_libs /usr/libdata/debug/usr/lib/sparc
) | obsolete_paths "${op}"
failed=$(( ${failed} + $? ))
Home |
Main Index |
Thread Index |
Old Index