Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2004 16:40:19 -0800 (PST)
From:      Oliver Eikemeier <eikemeier@fillmore-labs.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/63059: linux-flashplugin LATEST_LINK and RESTRICTED fixes
Message-ID:  <200402260040.i1Q0eJSr095592@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/63059; it has been noted by GNATS.

From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
To: "Brandon D. Valentine" <brandon@dvalentine.com>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/63059: linux-flashplugin LATEST_LINK and RESTRICTED fixes
Date: Thu, 26 Feb 2004 01:31:36 +0100

 Brandon D. Valentine wrote:
 
 > In the do-install target I have made these changes:
 > 
 > -	@${MKDIR} ${PREFIX}/${PLUGINSDIR}
 > -	@${LN} -sf ${PREFIX}/lib/linux-flashplugin6/${f} ${PREFIX}/${PLUGINSDIR}/
 > +.if exists(${PLUGINSDIR})
 > +	@${LN} -sf ${PREFIX}/lib/linux-flashplugin6/${f} ${PREFIX}/${PLUGINSDIR}
 > +.endif
 > 
 > Both ports previously did the wrong thing and created PLUGINSDIR whether
 > the netscape-linux or linux-mozilla ports were installed or not.  Now,
 > the port will only install symlinks if those ports are already
 > installed.  If those browsers are installed after flash is installed,
 > the linkfarm scripts included with those browsers will find these
 > plugins and create those symlinks on their own. [...]
 > 
 > 1) User installs linux-flashplugin6.
 > 2) User installs linux-mozilla.
 > 3) linux-mozilla port's linkfarm script installs symlink into PLUGINSDIR.
 > 4) User deinstalls linux-flashplugin6.
 > 5) There's now a dead symlink in PLUGINSDIR.
 > 
 > The way I've chosen to do it at least ensures that the symlinks always
 > get cleaned up.
 > 
 > Perhaps I shouldn't be removing symlinks created by another port, but at
 > present those ports create symlinks at install time based on whether my
 > ports are installed.  There are uglier things lurking in the linux
 > browser ports.
 
 Ok, I understand what should be done here. May I make two suggestions:
 
 - it would be nice to have the link creation in a pkg-install script,
   since the autodetection fails if the port is installed from a package
 
 - a more-or-less short comment what would be removed and why wouldn't be bad,
   (especially because this may remove symlinks not created by the port).
   I'm not sure where to place this comments, though. Perhaps the pkg-install
   script where the links are created is a good place.
 
 You can execute the post-install script with something like
 
 post-install:
 	${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 
 to avoid code duplication, but this may make your Makefile longer if this is the
 only thing you do in port-install.
 
 Otherwise the patches look good to me
     Oliver
 



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