Date: Wed, 25 Feb 2004 16:10:24 -0800 (PST) From: "Brandon D. Valentine" <brandon@dvalentine.com> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/63059: linux-flashplugin LATEST_LINK and RESTRICTED fixes Message-ID: <200402260010.i1Q0AO8u093317@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: "Brandon D. Valentine" <brandon@dvalentine.com> To: Oliver Eikemeier <eikemeier@fillmore-labs.com> Cc: "Brandon D. Valentine" <ports@brandon.dvalentine.com>, FreeBSD-gnats-submit@FreeBSD.org Subject: Re: ports/63059: linux-flashplugin LATEST_LINK and RESTRICTED fixes Date: Wed, 25 Feb 2004 18:07:04 -0600 On Wed, Feb 25, 2004 at 11:51:57PM +0100, Oliver Eikemeier wrote: > > Is there a reason for doing this? Yes. Though I must admit that it just took me a few minutes to remember why myself. 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. Because I no longer explicity create PLUGINSDIR, I can't rely on it existing during deinstall. I couldn't list the symlinks in pkg-plist any longer because there would be errors during deinstall on systems without one of those browser ports installed. "@unexec rm -f" will always succeed even if the files don't exist and deinstall will not emit any errors. I have seen several other ports use this trick. An alternative I have considered is to conditionally set %%PLUGINSDIR%% to "@comment" via PLIST_SUB when the PLUGINSDIR doesn't exist. The problem with that is this scenario: 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. I have been thinking for some time about proposing a central linux_browser_plugins directory similar to the ${X11BASE}/lib/browser_plugins. This would go a long way toward taking care of the various hacks strewn throughout ports related to Linux browsers and plugins. This however will require effort on the part of many port maintainers and I wasn't ready to tackle it in this update. HTH, Brandon D. Valentine -- brandon@dvalentine.com http://www.geekpunk.net Pseudo-Random Googlism: february is juvenile firesetters prevention month
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402260010.i1Q0AO8u093317>