<?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>83044</bug_id>
          
          <creation_ts>2005-02-23 02:12 0000</creation_ts>
          <short_desc>analog 5.32 failed to build due to ebuild bug</short_desc>
          <delta_ts>2005-02-23 18:14:46 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>Ebuilds</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>peter@spikings.com</reporter>
          <assigned_to>bug-wranglers@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>peter@spikings.com</who>
            <bug_when>2005-02-23 02:12:42 0000</bug_when>
            <thetext>pkg_setup method in ebuild incorrect as it fails to detect jpeg being present in the media-libs/gd use flags. The if statement in pkg_setup (if [ ! &quot;`has jpeg ${gd_use}`&quot; ] ;) compares the output of the command rather than the return code!

Reproducible: Always
Steps to Reproduce:
emerge app-admin/analog :)
Actual Results:  
myth app-admin # emerge app-admin/analog
Calculating dependencies ...done!
&gt;&gt;&gt; emerge (1 of 1) app-admin/analog-5.32 to /
&gt;&gt;&gt; md5 src_uri ;-) analog-5.32.tar.gz
 * libgd is missing jpeg support. Please add
 * &apos;jpeg&apos; to your USE flags, and re-emerge libgd.


I changed it as follows and it worked. How did this get past testing? :)

pkg_setup() {
        local gd_use=&quot;$(&lt;/var/db/pkg/`best_version media-libs/gd`/USE)&quot;
        if ! has jpeg ${gd_use} ; then
                eerror &quot;libgd is missing jpeg support. Please add&quot;
                eerror &quot;&apos;jpeg&apos; to your USE flags, and re-emerge libgd.&quot;
                die &quot;libgd needs jpeg support&quot;
        fi

        return 0
}

Can&apos;t see how this will help but I&apos;ll paste in the emerge info output for
completeness.

myth app-admin # emerge info
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5,
glibc-2.3.4.20040808-r1, 2.6.10 i686)
=================================================================
System uname: 2.6.10 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 18 2005, 16:05:41)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.7.9-r1, 1.9.4, 1.6.3, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.21-r1
ACCEPT_KEYWORDS=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-Os -march=pentium4 -pipe -fomit-frame-pointer -mmmx -ffast-math&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-Os -march=pentium4 -pipe -fomit-frame-pointer -mmmx -ffast-math&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs autoconfig ccache distlocks sandbox sfperms&quot;
GENTOO_MIRRORS=&quot;http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;x86 X alsa apache2 apm arts avi berkdb bitmap-fonts crypt cups curl dvd
emboss encode f77 fam font-server foomaticdb fortran gdbm gif gnome gpm gtk gtk2
imlib ipv6 jpeg kde libg++ libwww lirc mad mikmod motif mpeg mysql ncurses nls
oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl
spell ssl svga tcpd tiff transcode truetype truetype-fonts type1-fonts usb xml2
xmms xv xvidinfo zlib&quot;
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mr_bones_@gentoo.org</who>
            <bug_when>2005-02-23 18:14:46 0000</bug_when>
            <thetext>well that was just ugly.  Fixed in cvs.  Thanks for the bug report.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>