<?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>145222</bug_id>
          
          <creation_ts>2006-08-27 00:16 0000</creation_ts>
          <short_desc>dev-ruby/*  USE=&quot;-examples&quot; install examples</short_desc>
          <delta_ts>2007-01-26 16:04:37 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>Development</component>
          <version>unspecified</version>
          <rep_platform>All</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>betelgeuse@gentoo.org</reporter>
          <assigned_to>ruby@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>betelgeuse@gentoo.org</who>
            <bug_when>2006-08-27 00:16:56 0000</bug_when>
            <thetext>/usr/lib/ruby/gems/1.8/doc/activerecord-1.14.4/ri/DB2/Environment/data_sources-i.yaml
/usr/lib/ruby/gems/1.8/doc/activerecord-1.14.4/ri/DB2/Parameter/cdesc-Parameter.yaml
/usr/lib/ruby/gems/1.8/doc/activerecord-1.14.4/ri/DB2/Parameter/new-c.yaml
betelgeuse@pena /usr/portage/eclass $ qlist activerecord | grep doc | wc -l
692
betelgeuse@pena /usr/portage/eclass $

betelgeuse@pena /usr/portage/eclass $ qlist activerecord | grep examples
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/examples/associations.png
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/examples/associations.rb
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/examples/shared_setup.rb
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/examples/validation.rb

betelgeuse@pena /usr/portage/eclass $ emerge -pv activerecord

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-ruby/activerecord-1.14.4  USE=&quot;-doc -examples&quot; 0 kB

Total size of downloads: 0 kB
betelgeuse@pena /usr/portage/eclass $    

betelgeuse@pena /usr/portage/eclass $ emerge --info
Portage 2.1.1_pre5-r3 (default-linux/x86/2005.1, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.17-gentoo-r6 i686)
=================================================================
System uname: 2.6.17-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.12.4
Last Sync: Unknown
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [disabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17
ACCEPT_KEYWORDS=&quot;x86 ~x86&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;i686-pc-linux-gnu&quot;
CFLAGS=&quot;-O2 -march=pentium4 -pipe -mfpmath=sse -ffast-math -fomit-frame-pointer&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo&quot;
CXXFLAGS=&quot;-O2 -march=pentium4 -pipe -mfpmath=sse -ffast-math -fomit-frame-pointer&quot;
DISTDIR=&quot;/var/distfiles&quot;
FEATURES=&quot;autoaddcvs autoconfig collision-protect cvs distlocks fixpackages java-strict parallel-fetch sandbox sfperms sign strict stricter userpriv usersandbox verify-rdepend&quot;
GENTOO_MIRRORS=&quot; http://trumpetti.atm.tut.fi/gentoo  http://lame.lut.fi/linux/gentoo &quot;
LANG=&quot;en_US.utf8&quot;
LC_ALL=&quot;en_US.utf8&quot;
LDFLAGS=&quot;-Wl,--as-needed&quot;
LINGUAS=&quot;fi&quot;
MAKEOPTS=&quot;-j2 -s&quot;
PKGDIR=&quot;/home/pkg/&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=&apos;/distfiles&apos; --exclude=&apos;/local&apos; --exclude=&apos;/packages&apos;&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/mnt/checkouts/overlays/betelgeuse&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;x86 aac acl acpi alsa apm arts audiofile avi bash-completion berkdb bitmap-fonts bluetooth bzip2 cairo cdb cddb cdparanoia cli crypt cups dbus dlloader dri dts dvd dvdr dvdread elibc_glibc emboss esd ffmpeg firefox foomaticdb gif gstreamer gtk2 hal input_devices_keyboard input_devices_mouse isdnlog java jpeg kde kdeenablefinal kdehiddenvisibility kernel_linux libg++ libwww linguas_fi logitech-mouse mad mikmod mjpeg mmx mp3 mpeg ncurses network nptl nptlonly nsplugin nvidia offensive ogg oggvorbis opengl pam pcre pdflib png pppd qt3 quicktime readline real reflection rtc samba session spell spl sse sse2 ssl subversion svg symlink tcpd theora threads truetype truetype-fonts type1-fonts udev unicode usb userland_GNU userlocales video_cards_none video_cards_nvidia vorbis xcomposite xml xml2 xorg xv xvid xvmc zlib&quot;
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pclouds@gentoo.org</who>
            <bug_when>2006-12-30 08:49:27 0000</bug_when>
            <thetext>USE=-doc emerge activerecord should install no RI doc with recent gems.eclass.

WRT examples useflag, activerecord always install those example files and there is no easy/clean way to prevent that (Patching metadata.gz is no good because it&apos;s generated file. Patching Rakefile to modify gemspec and recreate gem is too risky). So I&apos;d rather ignore those example files (which means WONTFIX).

If RI doc is still installed, please reopen this bug.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>betelgeuse@gentoo.org</who>
            <bug_when>2006-12-31 09:00:57 0000</bug_when>
            <thetext>
&gt; WRT examples useflag, activerecord always install those example files and there
&gt; is no easy/clean way to prevent that (Patching metadata.gz is no good because
&gt; it&apos;s generated file. Patching Rakefile to modify gemspec and recreate gem is
&gt; too risky). So I&apos;d rather ignore those example files (which means WONTFIX).
&gt; 

Then the eclass should respect some variable that is defined before inherit and makes sure that the examples use flag is not put to IUSE. 
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pclouds@gentoo.org</who>
            <bug_when>2006-12-31 22:00:39 0000</bug_when>
            <thetext>Okay. Removing examples useflag from ruby.eclass means re-adding it to ebuilds, which could take a while before this bug can be closed.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>betelgeuse@gentoo.org</who>
            <bug_when>2007-01-01 03:38:39 0000</bug_when>
            <thetext>(In reply to comment #3)
&gt; Okay. Removing examples useflag from ruby.eclass means re-adding it to ebuilds,
&gt; which could take a while before this bug can be closed.
&gt; 

Plaah, let me spell this out. 

RUBY_SUPPORTS_EXAMPLES=&quot;no&quot;
inherit ruby

in ruby.eclass

[[ &quot;${RUBY_SUPPORT_EXAMPLES:-yes}&quot; == &quot;yes&quot; ]] &amp;&amp; IUSE=&quot;${IUSE} examples&quot;

solves the problem by adding this variable to this one ebuild and everything else continues to function as before.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pclouds@gentoo.org</who>
            <bug_when>2007-01-04 04:51:17 0000</bug_when>
            <thetext>We could do that for gems.eclass because we can&apos;t split gem packages anyway. However I&apos;m more concerned packages that have similar bugs. I&apos;ll check all through and fix this soon.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pclouds@gentoo.org</who>
            <bug_when>2007-01-17 14:44:31 0000</bug_when>
            <thetext>There are 48 in total 355 ebuilds which really have examples or samples, listed below. The plan is correct ruby.eclass with a magic switch (off by default). These ebuilds will get examples flag added together with the switch turned on so that they use correct eclass. When all ebuilds are fixed and tested, remove the switch, which in turn removes examples use flag from all other ebuilds.

cgikit-1.2.0
cgikit-1.2.1
dbi-0.1.1
eruby-1.0.4
eruby-1.0.5
FXRuby-1.4.7
FXRuby-1.6.4
fxruby_FXRuby-1.0.29
fxruby_FXRuby-1.2.6
IO-Reactor-0.0.6
mod_ruby-1.0.7
mod_ruby-1.2.2
mod_ruby-1.2.4
mod_ruby-1.2.5
ncurses-ruby-0.8
ncurses-ruby-0.9.1
ncurses-ruby-0.9.2
ncurses-ruby-1.1
qt4-qtruby-1.4.5
qt4-qtruby-1.4.6
qt4-qtruby-1.4.7
rcairo-1.0.0
rcairo-1.2.0
RMagick-1.10.1
RMagick-1.14.1
RMagick-1.3.2
RMagick-1.9.3
ruby_bdb-0.4.8
ruby_bdb-0.5.0
ruby_bdb-0.5.3
ruby_bdb-0.5.8
ruby_bdb-0.5.9
ruby-dbi_dbi-0.1.1
ruby-dbi_ruby-dbi-all-0.0.21
ruby-freedb-0.5
ruby-gdchart-1.0.0
rubygems-0.8.11
rubygems-0.9.0
ruby-gettext-0.8.0
ruby-pcap-0.6
ruby-termios-0.9.4
ruby-xslt_0.9.2
ruby-xslt_0.9.3
snmp-0.5.1
snmplib_snmp-0.5.1
sqlite-ruby-1.0
wxruby-0.4.0
xmpp4r-0.3
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pclouds@gentoo.org</who>
            <bug_when>2007-01-21 08:27:17 0000</bug_when>
            <thetext>Everything is set. Now you can comment out the following code in ruby.eclass to make it effective. I&apos;ll remove the switch next week if nothing goes badly.

# prepare for #145222 fix
# once testing is ok, this condition will be removed
if [ &quot;${RUBY_BUG_145222}&quot; != &quot;yes&quot; ]; then
   IUSE=&quot;examples&quot;
fi

The exact list of ebuilds which keep examples useflag is (not as same as the previous one):
IO-Reactor-0.0.6
cgikit-1.2.0
cgikit-1.2.1
eruby-1.0.5-r1
eruby-1.0.5
fxruby-1.2.6
fxruby-1.4.7
fxruby-1.6.4
ncurses-ruby-0.8
ncurses-ruby-0.9.1
ncurses-ruby-0.9.2
ncurses-ruby-1.1
rcairo-1.0.0
rcairo-1.2.0
rmagick-1.10.1
rmagick-1.14.1-r1
rmagick-1.14.1
rmagick-1.9.3-r1
ruby-bdb-0.4.8
ruby-bdb-0.5.0
ruby-bdb-0.5.3
ruby-bdb-0.5.8
ruby-bdb-0.5.9
ruby-dbi-0.0.21-r2
ruby-dbi-0.1.1
ruby-freedb-0.5
ruby-gdchart-1.0.0
ruby-gettext-0.8.0
ruby-pcap-0.6
ruby-termios-0.9.4
ruby-xslt-0.9.3
rubygems-0.8.11
rubygems-0.9.0-r1
rubygems-0.9.0
rubygems-0.9.1
snmplib-0.5.1
wxruby-0.4.0
xmpp4r-0.3
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pclouds@gentoo.org</who>
            <bug_when>2007-01-26 16:04:37 0000</bug_when>
            <thetext>examples use flag has been removed from ruby.eclass.

To ruby package maintainers: RUBY_BUG_145222 is legacy now, please remove it when you update ebuilds.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>