Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145222 - dev-ruby/* USE="-examples" install examples
Summary: dev-ruby/* USE="-examples" install examples
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-27 00:16 UTC by Petteri Räty (RETIRED)
Modified: 2007-01-26 16:04 UTC (History)
0 users

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 Petteri Räty (RETIRED) gentoo-dev 2006-08-27 00:16:56 UTC
/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="-doc -examples" 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="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -mfpmath=sse -ffast-math -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -pipe -mfpmath=sse -ffast-math -fomit-frame-pointer"
DISTDIR="/var/distfiles"
FEATURES="autoaddcvs autoconfig collision-protect cvs distlocks fixpackages java-strict parallel-fetch sandbox sfperms sign strict stricter userpriv usersandbox verify-rdepend"
GENTOO_MIRRORS=" http://trumpetti.atm.tut.fi/gentoo  http://lame.lut.fi/linux/gentoo "
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="fi"
MAKEOPTS="-j2 -s"
PKGDIR="/home/pkg/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/mnt/checkouts/overlays/betelgeuse"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="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"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-30 08:49:27 UTC
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's generated file. Patching Rakefile to modify gemspec and recreate gem is too risky). So I'd rather ignore those example files (which means WONTFIX).

If RI doc is still installed, please reopen this bug.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2006-12-31 09:00:57 UTC
> 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's generated file. Patching Rakefile to modify gemspec and recreate gem is
> too risky). So I'd rather ignore those example files (which means WONTFIX).
> 

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. 
Comment 3 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-31 22:00:39 UTC
Okay. Removing examples useflag from ruby.eclass means re-adding it to ebuilds, which could take a while before this bug can be closed.
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2007-01-01 03:38:39 UTC
(In reply to comment #3)
> Okay. Removing examples useflag from ruby.eclass means re-adding it to ebuilds,
> which could take a while before this bug can be closed.
> 

Plaah, let me spell this out. 

RUBY_SUPPORTS_EXAMPLES="no"
inherit ruby

in ruby.eclass

[[ "${RUBY_SUPPORT_EXAMPLES:-yes}" == "yes" ]] && IUSE="${IUSE} examples"

solves the problem by adding this variable to this one ebuild and everything else continues to function as before.
Comment 5 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2007-01-04 04:51:17 UTC
We could do that for gems.eclass because we can't split gem packages anyway. However I'm more concerned packages that have similar bugs. I'll check all through and fix this soon.
Comment 6 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2007-01-17 14:44:31 UTC
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
Comment 7 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2007-01-21 08:27:17 UTC
Everything is set. Now you can comment out the following code in ruby.eclass to make it effective. I'll remove the switch next week if nothing goes badly.

# prepare for #145222 fix
# once testing is ok, this condition will be removed
if [ "${RUBY_BUG_145222}" != "yes" ]; then
   IUSE="examples"
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
Comment 8 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2007-01-26 16:04:37 UTC
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.