tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: postinstall(8) update to cleanup obsolete .debug libs
On Fri, Nov 26, 2010 at 05:27:13PM +0000, Iain Hibbert wrote:
> On Fri, 26 Nov 2010, Nicolas Joly wrote:
>
> > The attached patch add support for postinstall(8) to cleanup obsolete
> > .debug libraries, using the existing libraries cleanup mecanism.
>
> would it make sense to modify obsolete_libs() to check ${DEST_DIR}/${dir}
> and ${DEST_DIR}/usr/libdata/debug/${dir} instead of listing them
> specifically?
Sure, how about this one ?
> arguably it should also check for "o32" and "64" compat dirs in the
> "mips64e[bl]" case..
Yep, but that's an other story ;)
--
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 18:50:52 -0000
@@ -482,6 +482,14 @@ obsolete_libs()
[ $# -eq 1 ] || err 3 "USAGE: obsolete_libs dir"
dir="$1"
+ _obsolete_libs "${dir}"
+ _obsolete_libs "/usr/libdata/debug/${dir}"
+}
+
+_obsolete_libs()
+{
+ dir="$1"
+
(
if [ ! -e "${DEST_DIR}/${dir}" ]
@@ -522,7 +530,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
Home |
Main Index |
Thread Index |
Old Index