<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>112635</bug_id>
          
          <creation_ts>2005-11-15 12:47 0000</creation_ts>
          <short_desc>librsvg nsplugin won&apos;t build</short_desc>
          <delta_ts>2006-02-15 20:22:32 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>GNOME</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>portage@bigmichi1.dyndns.org</reporter>
          <assigned_to>gnome@gentoo.org</assigned_to>
          <cc>gentoo@daniel-nilsson.com</cc>
    
    <cc>sven.koehler@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>portage@bigmichi1.dyndns.org</who>
            <bug_when>2005-11-15 12:47:45 0000</bug_when>
            <thetext>i&apos;m installing gnome and this puts in firefox and also gecko-sdk and also
librsvg, but there i get this message:

&gt;&gt;&gt; md5 files   ;-) librsvg-2.12.7.ebuild
&gt;&gt;&gt; md5 files   ;-) files/digest-librsvg-2.12.6
&gt;&gt;&gt; md5 files   ;-) files/digest-librsvg-2.12.7
&gt;&gt;&gt; md5 files   ;-) files/digest-librsvg-2.9.5
&gt;&gt;&gt; md5 files   ;-) files/digest-librsvg-1.0.3
&gt;&gt;&gt; md5 files   ;-) files/librsvg-2.12.6-plugin_checks.patch
&gt;&gt;&gt; md5 src_uri ;-) librsvg-2.12.7.tar.bz2
 * A SVG plugin for mozilla-compatible browsers is already present
 * in your system. To avoid replacing the old plug-in, librsvg
 * will be built with the plugin disabled.
 *
 * In order to use the plugin from librsvg, please make sure to
 * emerge gecko-sdk/mozilla-firefox/mozilla without the &apos;mozsvg&apos;
 * USE flag.

but all of them show mozsvg as disabled:

bigmichi1 librsvg # emerge -pv gecko-sdk mozilla-firefox mozilla --nodeps

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-libs/gecko-sdk-1.7.12-r1  +crypt -debug +gnome +ipv6 +java
+ldap +mozcalendar +mozdevelop -moznocompose -moznoirc -moznomail -moznoxft
-mozsvg +postgres +ssl +truetype +xinerama +xprint 0 kB
[ebuild  N    ] www-client/mozilla-firefox-1.0.7-r3  -debug +gnome +ipv6 +java
+mozcalendar +mozdevelop -moznoxft -mozsvg +truetype +xinerama +xprint 32,131 kB
[ebuild  N    ] www-client/mozilla-1.7.12-r2  +crypt -debug +gnome +ipv6 +java
+ldap +mozcalendar +mozdevelop -moznocompose -moznoirc -moznomail -moznoxft
-mozsvg +postgres +ssl +truetype +xinerama +xprint 468 kB

i think the logic in the built_with_use is wrong, in my opinion all || must be
&amp;&amp; and then it would be compiled

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Actual Results:  
svg-plugin is not build when nsplugin and -mozsvg is set

Expected Results:  
should be build</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>otaku@bebop.ath.cx</who>
            <bug_when>2005-12-09 04:59:08 0000</bug_when>
            <thetext>you should change

if use nsplugin &amp;&amp; ( \
                built_with_use net-libs/gecko-sdk mozsvg || \
                built_with_use www-client/mozilla-firefox mozsvg || \
                built_with_use www-client/mozilla mozsvg ); then

in

if use nsplugin &amp;&amp; ( \
                built_with_use net-libs/gecko-sdk mozsvg &amp;&amp; \
                built_with_use www-client/mozilla-firefox mozsvg &amp;&amp; \
                built_with_use www-client/mozilla mozsvg ); then</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@daniel-nilsson.com</who>
            <bug_when>2006-01-23 11:22:48 0000</bug_when>
            <thetext>I have the exact same problem and have done some investigation.
I have mozilla-firefox (1.0.7-r4) and gecko-sdk (1.7.12-r1) both installed without mozsvg (I double checked with equery). I have not installed mozilla at all.
Allthough I have little experience with ebuilds and shell programming (but I know other programming languages well) it looks to me that the logic in the ebuild is correct (but read on) and the proposal in comment #2 is wrong. I then looked up the source for the built_with_use function in eutils.eclass and there I found what&apos;s causing the problem. If the funtion is called for a package that is not installed it returns as if the requested flag was set (if I followed the code right, returning 0 is true and returning 1 is false in bash, right?)
That means that the logic in the ebuild is only correct if all three packages are installed.
The logic needs to be changed to only check the mozsvg flag for installed packages but how to do that is beyond my knowlege.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sven.koehler@gmail.com</who>
            <bug_when>2006-01-26 13:37:46 0000</bug_when>
            <thetext>I looked it up too.
built_with_use is returning 0=true for packages that are not installed.

Either the logic of the ebuild is wrong (it has to check, whether the packages are installed at all, and then if the useflag is set for them) or the logic within built_with_use is really wrong. I prefer the latter.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gentoo@daniel-nilsson.com</who>
            <bug_when>2006-02-15 14:17:24 0000</bug_when>
            <thetext>Created an attachment (id=79875)
Patch to fix the logic in the ebuild

The attached patch fixes the ebuild for me. It changes the logic to first test if each package is installed before checking for the mozsvg use-flag.
The solution is similar to that in several other ebuilds in portage (e.g. libquicktime-0.9.7-r1 and gimp-print-5.0.0_rc2)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>leonardop@gentoo.org</who>
            <bug_when>2006-02-15 20:22:32 0000</bug_when>
            <thetext>Thanks for the patch Daniel. It&apos;s been committed to the tree.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>79875</attachid>
            <date>2006-02-15 14:17 0000</date>
            <desc>Patch to fix the logic in the ebuild</desc>
            <filename>librsvg.ebuild.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3IvcG9ydGF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