media-gfx/evoluspencil-2.0.3 rdepends on www-client/firefox OR www-client/firefox-bin. However, it doesn't work if only the latter is installed. The reason for this is that /usr/bin/evoluspencil has a hard reference to /usr/bin/firefox, which does not exist if only www-client/firefox-bin, but not www-client/firefox is installed. Reproducible: Always
@mozilla, the package installs this shell script: #!/bin/sh /usr/bin/firefox --app "/usr/share/evoluspencil/application.ini" What would you recommend to best support firefox-bin users? Will removing /usr/bin/ and relying on $PATH be OK?
The best option would be to implement a new launcher script that checks for the existance of /usr/bin/firefox, if it doesn't exist, try /usr/bin/firefox-bin and if that doesn't exist, fail out (This can be done in 6 lines of shell-independent sh). They intentionally use a different binary name so you can have both firefox and firefox-bin installed on the same system.
Proposed replacement launcher: #!/bin/sh if [ -x /usr/bin/firefox ] ; then /usr/bin/firefox --app "/usr/share/evoluspencil/application.ini" elif [ -x /usr/bin/firefox-bin ] ; then /usr/bin/firefox-bin --app "/usr/share/evoluspencil/application.ini" else echo Could not execute required /usr/bin/firefox or /usr/bin/firefox-bin fi
(In reply to comment #3) > Proposed replacement launcher: > > #!/bin/sh > > if [ -x /usr/bin/firefox ] ; then > /usr/bin/firefox --app "/usr/share/evoluspencil/application.ini" > elif [ -x /usr/bin/firefox-bin ] ; then > /usr/bin/firefox-bin --app "/usr/share/evoluspencil/application.ini" > else > echo Could not execute required /usr/bin/firefox or > /usr/bin/firefox-bin > fi Looks good to me
You could probably make it more generic simply by using 'which'. It might also be pertinent to add the ability for a user to override this via a config file in their home dir. Also, would there be any reason why an end-user would care to explicitly choose which one they'd want? ie, should we allow for an environment or config-file override? (see below for example) #!/bin/sh if [ -e ~/.evoluspencil ]; then . ~/.evoluspencil fi if [ ! -x "${FFBIN}" ]; then FFBIN=$(which firefox 2>/dev/null) if [ ! -x "${FFBIN} ]; then FFBIN=$(which firefox-bin 2>/dev/null) if [ ! -x "${FFBIN}" ]; then echo Could not execute required /usr/bin/firefox or /usr/bin/firefox-bin exit 1 fi fi fi exec ${FFBIN} --app "/usr/share/evoluspencil/application.ini"
(In reply to comment #5) > Also, would there be any reason why an end-user would care to explicitly > choose which one they'd want? ie, should we allow for an environment or > config-file override? (see below for example) I'm not sure, I can't think of any reason offhand.
Thanks, fixed in CVS. + 13 Jun 2013; Michael Palimaka <kensington@gentoo.org> + +evoluspencil-2.0.4.ebuild, +files/evoluspencil-2.0.4-exportpng.patch, + +files/launcher: + Version bump. Add patch to fix exporting to PNG (bug #468888). Add custom + launcher to support firefox-bin (bug #468142).