Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2006 09:33:12 -0700
From:      John E Hein <jhein@timing.com>
To:        emulation@freebsd.org
Subject:   Re: [ports-i386@pointyhat.freebsd.org: linux_base-8-8.0_12 failed on i386 6]
Message-ID:  <17370.19272.894628.650315@gromit.timing.com>
In-Reply-To: <20060127071644.GB34398@xor.obsecurity.org>
References:  <20060127071644.GB34398@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Kris Kennaway wrote at 02:16 -0500 on Jan 27, 2006:
[snip]
 > === Checking filesystem state
 > list of extra files and directories in / (not present before this port was installed but present after it was deinstalled)
 > 401931       16 drwxr-xr-x    3 root             wheel                 512 Jan 27 06:41 compat/linux/usr
 >  89818       16 drwxr-xr-x   12 root             wheel                 512 Jan 27 06:24 compat/linux/usr/local
[snip]


The following patch will help with this.  It avoids whacking usr/local
if someone adds something to it in their compat tree after install and
then upgrades their linux-base port.  It only removes empty dirs.

A test install/deinstall shows that it solves the problem pointyhat
found... clean /compat/linux before and after.

Index: Makefile
===================================================================
RCS file: /base/FreeBSD-CVS/ports/emulators/linux_base-8/Makefile,v
retrieving revision 1.117
diff -u -p -r1.117 Makefile
--- Makefile	25 Jan 2006 18:57:36 -0000	1.117
+++ Makefile	27 Jan 2006 16:25:49 -0000
@@ -109,7 +109,7 @@ RPMFLAGS=		--root ${PREFIX} --dbpath ${D
 			--replacepkgs --ignoreos --ignorearch
 RPMDIR=			${DISTDIR}/${DIST_SUBDIR}
 
-REMOVE_DIRS=		boot dev home initrd root tmp var/run var/tmp usr/tmp
+REMOVE_DIRS=		boot dev home initrd root tmp var/run var/tmp usr/local usr/tmp
 REMOVE_FILES=		bin/df bin/su etc/exports etc/group etc/localtime \
 			etc/motd etc/passwd etc/printcap etc/services \
 			etc/protocols
@@ -176,7 +176,7 @@ do-install:
 # Finish
 #
 	@for D in ${REMOVE_DIRS}; do \
-		${RM} -rf ${PREFIX}/$$D; \
+		${FIND} ${PREFIX}/$$D -depth -type d -exec ${RMDIR} {} \; || true ; \
 	done
 	@for F in ${REMOVE_FILES}; do \
 		${RM} -f ${PREFIX}/$$F; \




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17370.19272.894628.650315>