Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jan 2004 12:26:46 +0100
From:      Thierry Thomas <thierry@pompo.net>
To:        Edwin Groothuis <edwin@freebsd.org>
Cc:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/58661 - www/mozex
Message-ID:  <20040111112645.GA25522@graf.pompo.net>
In-Reply-To: <200401102250.i0AMoDPD083592@freefall.freebsd.org>
References:  <200401102250.i0AMoDPD083592@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Le Sam 10 jan 04 à 23:50:13 +0100, Edwin Groothuis <edwin@freebsd.org>
 écrivait :
> The following reply was made to PR ports/58661; it has been noted by GNATS.
> 
> From: Edwin Groothuis <edwin@freebsd.org>
> To: freebsd-gnats-submit@FreeBSD.org, thierry@pompo.net
> Cc:  
> Subject: Re: ports/58661 - www/mozex
> Date: Sun, 11 Jan 2004 09:43:19 +1100
> 
>  This port removes some files during installation:
>  
>  	pkg-install.xpi:rm -f $MOZDIR/chrome/*.rdf
>  
>  Which caused the deletion of the following files on my computer:
>  
>  	/usr/X11R6/lib/mozilla/chrome/user-skins.rdf
>  	/usr/X11R6/lib/mozilla/chrome/user-locales.rdf
>  
>  Is that okay?

Hmmm... Since my initial PR, I have found several strange behaviours
with Chrome Registry => see a first patch for www/mozex/pkg-install.xpi
included into PR ports/58847.

The important point is that this is not dangerous: one can remove these
files, and it's possible to rebuild the Chrome's directory. I'm using
this method on my machine without problem. But when you install /
deinstall several extensions, reinstall mozilla, etc., you break
pkg-plist & /var/db/pkg/mozilla/+CONTENTS.

I have found how to minimize these deinstallation breakages, but a patch
of mozilla (and mozilla*) is required (=> Cc: to gnome@FreeBSD.org).
In the current Makefile, the registrry is built during post-build:, but
under ${WRKSRC}. The following patch builds it again in the install
directory:

--- mozilla.diff begins here ---
diff -urN www/mozilla.orig/Makefile www/mozilla/Makefile
--- www/mozilla.orig/Makefile	Thu Dec  4 18:42:23 2003
+++ www/mozilla/Makefile	Sun Jan 11 11:50:08 2004
@@ -288,6 +288,7 @@
 	done
 
 post-install:
+	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${CHMOD} -R u-w ${PREFIX}/lib/${MOZILLA}/components
 	@${CAT} ${PKGMESSAGE}
 
diff -urN www/mozilla.orig/pkg-install www/mozilla/pkg-install
--- www/mozilla.orig/pkg-install	Thu Jan  1 01:00:00 1970
+++ www/mozilla/pkg-install	Sat Nov 29 09:38:20 2003
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Date created:			  Mon Nov 29, 2003
+# Whom:				  Thierry Thomas (<thierry@pompo.net>)
+# Fix the chrome registry.
+
+umask 022
+PATH=/bin:/usr/bin
+
+[ "x$1" = "x" ] && exit 1
+[ "x$2" != "xPOST-INSTALL" ] && exit 0
+
+PREFIX=${PKG_PREFIX:-/usr/X11R6}
+
+PKG_NAME=${1%%-[0-9._]*}
+PKG_ROOT=$(echo $PKG_NAME | sed 's/-firebird//')
+if [ $PKG_NAME = $PKG_ROOT ]; then
+MOZBIN=mozilla-bin
+else
+MOZBIN=MozillaFirebird-bin
+fi
+
+MOZDIR=`find $PREFIX/lib -name $MOZBIN -exec dirname {} \; | head -n 1`
+REGXPCOM=$MOZDIR/regxpcom
+REGCHROME=$MOZDIR/regchrome
+
+echo "===>  Building Chrome's registry..."
+rm -rf $MOZDIR/chrome/overlayinfo
+rm -f $MOZDIR/chrome/*.rdf
+mkdir -p $MOZDIR/chrome/overlayinfo
+rm -f $MOZDIR/component.reg
+
+LD_LIBRARY_PATH=$MOZDIR MOZILLA_FIVE_HOME=$MOZDIR $MOZDIR/regxpcom || true
+LD_LIBRARY_PATH=$MOZDIR MOZILLA_FIVE_HOME=$MOZDIR $MOZDIR/regchrome || true
+
+exit 0
--- mozilla.diff ends here ---

With this patch, deinstallations go better, but I'm not certain that it
addresses every case.
-- 
Th. Thomas.



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