Mailinglist Archive: opensuse-bugs (4650 mails)

< Previous Next >
[Bug 970773] gem_install.sh selects wrong gem version
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 07 Jun 2017 20:10:37 +0000
  • Message-id: <bug-970773-21960-KR0fsURaMl@http.bugzilla.opensuse.org/>
http://bugzilla.opensuse.org/show_bug.cgi?id=970773
http://bugzilla.opensuse.org/show_bug.cgi?id=970773#c9

--- Comment #9 from Luiz Angelo Daros de Luca <luizluca@xxxxxxxxxxxxx> ---
Created attachment 728085
--> http://bugzilla.opensuse.org/attachment.cgi?id=728085&action=edit
Fix gem_install args processing (= gem_packages.sh)

I'll reopen once more this bug. It was not "resolved" as it was marked, but
rather considered invalid. Even with the suggested behavior being "make two
packages", I still see the same problems with ruby macro and gem_install:

1) --default-gem is set in gem_install.sh but never used. It should either be
deprecated and removed from macro %gem_install or recover its usage

2) macro %gem_install still mentions --gem-binary, which is deprecated and will
only result in a warning when %{gem_binary} is set

3) in gem_install.sh, "if options.gemfile.nil?" is always true as nothing can
set it inside options. It is some left-over stuff.

4) /usr/lib/rpm/gem_packages.sh do accept a gem as last argument, but it is
normally not used. If not provided, it will search for a file identified by -
-default-gem. This is same option in gem_install.sh that does nothing.

My suggestion is to change gem_install.sh and make it work just like
gem_packages.sh. An arg must work equally or break on both scripts.

This patch changes:
* restore --default-gem behavior to match the one from gem_packages.sh
* ignores unknown arguments and warn. Previously, they would still be passed to
"gem install". Now they are ignored. Should they still be passed on?
* avoid showing warn "unhandled options:" with no unhandled options.
* check if the last "unhandled option" is an existing file and use it as
gemfile

--
You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >