Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 483832 - app-admin/ec2-ami-tools- depends on dev-lang/ruby:1.9, but still changes the shebang to ruby18
Summary: app-admin/ec2-ami-tools- depends on dev-lang/ruby:1.9, but still ch...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tom Wijsman (TomWij) (RETIRED)
Depends on:
Reported: 2013-09-06 04:35 UTC by Paul Tobias
Modified: 2013-09-09 07:47 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Paul Tobias 2013-09-06 04:35:52 UTC
As the result of bug #483094 the ruby:1.8 dependency in ec2-ami-tools- got changed to ruby:1.9 in

But the ebuild still contains the following line in src_prepare():
sed -i -e '$s:^ruby:exec ruby18:' bin/* || die 'Sed failed.'

This forces the files to use ruby18, which will be actually unmerged after a depclean. The fix is just to remove the whole sed line, it's working well with ruby 1.9. Please note I didn't test with dev-lang/ruby:2.0 installed, as I don't want to have multiple ruby versions. It might be needed to force ruby19 if it's not working with ruby20.

Reproducible: Always

Steps to Reproduce:
1. emerge =app-admin/ec2-ami-tools-
2. emerge --depclean
3. run ec2-ami-tools-version
Actual Results:  
$ ec2-ami-tools-version 
/usr/bin/ec2-ami-tools-version: line 4: exec: ruby18: not found

Expected Results:  
$ ec2-ami-tools-version 20071010

Copyright 2008-2009, Inc. or its affiliates.  All Rights Reserved.
Licensed under the Amazon Software License (the "License").  You may not use
this file except in compliance with the License. A copy of the License is
located at or in the "license" file accompanying this
file.  This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

$ emerge --info
Portage (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.17, 3.11.0-gentoo x86_64)
System uname: Linux-3.11.0-gentoo-x86_64-AMD_A6-4455M_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2
KiB Mem:     5870056 total,    448336 free
KiB Swap:    5242876 total,   5242524 free
Timestamp of tree: Fri, 06 Sep 2013 01:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r2, 3.2.5-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo bud
CFLAGS="-O2 -pipe -mtune=native -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -mtune=native -fomit-frame-pointer"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --nospinner"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" rsync://"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X a52 aac acpi afterimage alsa amd64 amr aot apng archive avx bash-completion bluetooth bluray branding bs2b btrfs bzip2 cairo cdr cli consolekit crossfade crypt cue cups curl cxx dbus device-mapper dga dirac distinct-l djvu dri dts dv dvd dvdr emboss enca exif faac fading-colors fam fat ffmpeg firefox flac fontconfig force-hints freerdp ftp g3dvl g726 g729 gconf gcrypt gdu gif git glibc-omitfp gmail gmp gnome-keyring gpg gpm gsm gstreamer gtk gtk3 gtkstyle hddtemp iconv icu ilbc imagemagick imlib infinality iproute2 ipv6 jingle jpeg jpeg2k kate keymap laptop libass libkms libnl libnotify libproxy libsecret libssh2 libtiger live llvm lm_sensors lyrics lzma lzo mad matroska mmx mmxext mng modules mozilla mp3 mp4 mpeg mplayer msn mtp multilib musepack nat-transport natspec ncurses netboot network-cron nokia nominatim nptl ntfs ntfsprogs ntp offensive ogg opengl openipmi openmp optimization optimized-qmake pam pango passwordsave pch pcre pdf pdfimport pgo png policykit postproc ppds pth pulseaudio qt3support qt4 rar rdesktop readline rtsp schroedinger sdl session shout silk smime sna speex srt srtp sse sse2 sse3 sse4 sse4_1 ssh ssl ssse3 startup-notification stereo stream strong-optimization svg symlink system-cairo system-jpeg system-sqlite telepathy tftp theora tiff truetype udev udisks unicode upower urandom usb v4l v4l2 vaapi vim-syntax vlc vnc vorbis vte wavpack webcam webgl webkit webkit2 wifi wma x264 xcb xfce xml xnest xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="intel8x0 usb-audio" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon *" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" FOO2ZJS_DEVICES="hp1020" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="g15 ncurses png text xosd" LIBREOFFICE_EXTENSIONS="pdfimport wiki-publisher" LINGUAS="en en_US hu" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="intel i915 radeon vesa" XFCE_PLUGINS="brightness logout" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-07 14:12:15 UTC
Also, S="${WORKDIR}/${P}" is the default.
Comment 2 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-09-07 14:22:42 UTC
+  07 Sep 2013; Tom Wijsman <> +ec2-ami-tools-,
+  -ec2-ami-tools-
+  Revision bump. Fixed up ruby version sed by using a variable instead and
+  removed redundant S definition. Fixes bug #483832 reported by Paul Tobias.

Thank you both.


Paul: Can you test whether it works fine with Ruby 1.9 now and report back? I no longer have access to Amazon instances myself so cannot fully guarantee it works.

Thank you very much in advance.
Comment 3 Paul Tobias 2013-09-09 07:47:10 UTC
Thank you Tom,

Now I emerged ruby 2.0 too, and tried the tools with both 1.9 and 2.0. Although I didn't try them all, but I can confirm ec2-bundle-image, ec2-bundle-vol and ec2-upload-bundle works with both ruby 1.9 and 2.0. I didn't find anything which wouldn't work with either of these ruby versions. I think it might be ok to depend on dev-lang/ruby[ssl], remove the sed, and use the ruby selected by eselect ruby.

( I had to explicitly set --ec2cert /etc/ec2/amitools/cert-ec2.pem, because the tools were looking for $EC2_AMITOOL_HOME/etc/ec2/amitools/cert-ec2.pem, where $EC2_AMITOOL_HOME is /usr, but that's a different issue. )