Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 468142 - =media-gfx/evoluspencil-2.0.3 does not work with www-client/firefox-bin
Summary: =media-gfx/evoluspencil-2.0.3 does not work with www-client/firefox-bin
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Palimaka (kensington)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-01 13:54 UTC by Robert G. Siebeck
Modified: 2013-06-13 11:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert G. Siebeck 2013-05-01 13:54:17 UTC
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
Comment 1 Michael Palimaka (kensington) gentoo-dev 2013-05-07 15:44:24 UTC
@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?
Comment 2 Jeff (JD) Horelick (RETIRED) gentoo-dev 2013-05-07 16:04:50 UTC
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.
Comment 3 Michael Palimaka (kensington) gentoo-dev 2013-05-08 12:04:01 UTC
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
Comment 4 Jeff (JD) Horelick (RETIRED) gentoo-dev 2013-05-08 18:22:21 UTC
(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
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2013-05-08 18:58:18 UTC
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"
Comment 6 Michael Palimaka (kensington) gentoo-dev 2013-05-09 16:04:46 UTC
(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.
Comment 7 Michael Palimaka (kensington) gentoo-dev 2013-06-13 11:14:38 UTC
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).