Avoid "method redefined;" warnings due to modified operating_system.rb.

Fix strange paths created during build of binary gems.
This commit is contained in:
Vít Ondruch 2013-03-05 08:35:05 +01:00
parent a9ecc1d687
commit b0d63dbf0f
3 changed files with 15 additions and 2 deletions

View File

@ -38,6 +38,15 @@ module Gem
end]
end
##
# Remove methods we are going to override. This avoids "method redefined;"
# warnings otherwise issued by Ruby.
remove_method :default_dir if method_defined? :default_dir
remove_method :default_path if method_defined? :default_path
remove_method :default_bindir if method_defined? :default_bindir
remove_method :default_ext_dir_for if method_defined? :default_ext_dir_for
##
# RubyGems default overrides.

View File

@ -26,7 +26,7 @@
%endif
%global release 2
%global release 3
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
%global ruby_libdir %{_datadir}/%{name}
@ -863,6 +863,10 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/tkextlib
%changelog
* Tue Mar 05 2013 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-3
- Avoid "method redefined;" warnings due to modified operating_system.rb.
- Fix strange paths created during build of binary gems.
* Mon Feb 25 2013 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-2
- Prevent squash of %%gem_install with following line.

View File

@ -337,7 +337,7 @@ index d7d953f..812c20c 100644
mf = mf.gsub(/\s*\S+\.time$/, "")
+ # Folder creation was dropped in r37016 for some reasons :/
+ target_prefix = mf[/^target_prefix\s*=\s*(.*)/, 1]
+ target_prefix = mf[/^target_prefix\s*=[^\S\n]*(.*)$/, 1]
+ FileUtils.mkdir_p File.join(dest_path, target_prefix) rescue nil # in case of perms issues -- lame
+
File.open('Makefile', 'wb') {|f| f.print mf}