From thierry@pompo.net  Sun Feb  2 13:07:36 2003
Return-Path: <thierry@pompo.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8277037B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  2 Feb 2003 13:07:36 -0800 (PST)
Received: from postfix3-2.free.fr (postfix3-2.free.fr [213.228.0.169])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 21C2243F3F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  2 Feb 2003 13:07:35 -0800 (PST)
	(envelope-from thierry@pompo.net)
Received: from graf.pompo.net (lyon-1-a7-62-147-17-97.dial.proxad.net [62.147.17.97])
	by postfix3-2.free.fr (Postfix) with ESMTP id E9689C12E
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  2 Feb 2003 22:07:31 +0100 (CET)
Received: by graf.pompo.net (Postfix, from userid 1001)
	id 61F1076A8; Sun,  2 Feb 2003 22:00:57 +0100 (CET)
Message-Id: <20030202210057.61F1076A8@graf.pompo.net>
Date: Sun,  2 Feb 2003 22:00:57 +0100 (CET)
From: Thierry Thomas <thierry@pompo.net>
Reply-To: Thierry Thomas <thierry@pompo.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: devel/pear-PEAR: fixing deinstallation.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         47819
>Category:       ports
>Synopsis:       devel/pear-PEAR: fixing deinstallation.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 02 13:10:12 PST 2003
>Closed-Date:    Tue Feb 11 21:43:59 PST 2003
>Last-Modified:  Tue Feb 11 21:43:59 PST 2003
>Originator:     Thierry Thomas
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 4.7-STABLE FreeBSD 4.7-STABLE #0: Sun Dec 29 12:46:07 CET 2002 root@graf.pompo.net:/usr/obj/mntsrc/src/sys/GRAF020727 i386


	
>Description:
	- lib/php/OS is not back-up'ed when installing devel/pear-PEAR,
	and the original is lost when you deinstall it.

	- tidy code a little.

>How-To-Repeat:
	Install devel/pear-PEAR, deinstall it, check lib/php/OS.

>Fix:

	Please apply this patch:


diff -urN devel/pear-PEAR.orig/Makefile devel/pear-PEAR/Makefile
--- devel/pear-PEAR.orig/Makefile	Thu Jan 30 14:41:47 2003
+++ devel/pear-PEAR/Makefile	Sun Feb  2 19:02:43 2003
@@ -29,17 +29,16 @@
 LPHP_LIB=	lib/php
 PEARDIR=	${PHP_BASE}/${LPHP_LIB}
 PLIST_SUB=	PEARDIR=${LPHP_LIB}
+MANIFEST=	OS PEAR PEAR.php System.php package.dtd scripts template.spec
+TOBACKUP=	OS PEAR PEAR.php System.php
 
 do-install:
-	@${MV} ${PEARDIR}/PEAR ${PEARDIR}/PEAR.dist
-	@${MV} ${PEARDIR}/PEAR.php ${PEARDIR}/PEAR.php.dist
-	@${MV} ${PEARDIR}/System.php ${PEARDIR}/System.php.dist
+.for FILE in ${TOBACKUP}
+	@${MV} ${PEARDIR}/${FILE} ${PEARDIR}/${FILE}.dist
+.endfor
 	@${CP} -Rp ${WRKSRC}/* ${PEARDIR}
-	@${CHOWN} -R root:wheel ${PEARDIR}/OS
-	@${CHOWN} -R root:wheel ${PEARDIR}/PEAR*
-	@${CHOWN} -R root:wheel ${PEARDIR}/System.php
-	@${CHOWN} -R root:wheel ${PEARDIR}/package.dtd
-	@${CHOWN} -R root:wheel ${PEARDIR}/scripts
-	@${CHOWN} -R root:wheel ${PEARDIR}/template.spec
+.for FILE in ${MANIFEST}
+	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PEARDIR}/${FILE}
+.endfor
 
 .include <bsd.port.post.mk>
diff -urN devel/pear-PEAR.orig/pkg-plist devel/pear-PEAR/pkg-plist
--- devel/pear-PEAR.orig/pkg-plist	Thu Jan 30 14:41:47 2003
+++ devel/pear-PEAR/pkg-plist	Sun Feb  2 19:06:01 2003
@@ -1,3 +1,4 @@
+@exec mv %D/lib/php/OS %D/lib/php/OS.dist
 @exec mv %D/lib/php/PEAR %D/lib/php/PEAR.dist
 @exec mv %D/lib/php/PEAR.php %D/lib/php/PEAR.php.dist
 @exec mv %D/lib/php/System.php %D/lib/php/System.php.dist
@@ -32,6 +33,7 @@
 @dirrm %%PEARDIR%%/PEAR/Frontend
 @dirrm %%PEARDIR%%/PEAR
 @dirrm %%PEARDIR%%/scripts
+@unexec mv %D/lib/php/OS.dist %D/lib/php/OS || true
 @unexec mv %D/lib/php/PEAR.dist %D/lib/php/PEAR || true
 @unexec mv %D/lib/php/PEAR.php.dist %D/lib/php/PEAR.php || true
 @unexec mv %D/lib/php/System.php.dist %D/lib/php/System.php || true
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Tue Feb 11 21:43:52 PST 2003 
State-Changed-Why:  
Commited, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=47819 
>Unformatted:
