Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Staging:E
ruby2.1
0001-rubygems-1.5.0-buildroot.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-rubygems-1.5.0-buildroot.patch of Package ruby2.1
From 2933ec180ffa450ade517f017b637db47949775e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de> Date: Tue, 7 Mar 2017 13:02:10 +0100 Subject: [PATCH 01/13] rubygems 1.5.0 buildroot --- lib/rubygems/dependency_installer.rb | 2 ++ lib/rubygems/install_update_options.rb | 6 ++++++ lib/rubygems/installer.rb | 9 +++++++++ 3 files changed, 17 insertions(+) diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb index da6994a9be..bf4299bc19 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb @@ -72,6 +72,7 @@ class Gem::DependencyInstaller def initialize options = {} @only_install_dir = !!options[:install_dir] @install_dir = options[:install_dir] || Gem.dir + @build_root = options[:build_root] options = DEFAULT_OPTIONS.merge options @@ -382,6 +383,7 @@ class Gem::DependencyInstaller :security_policy => @security_policy, :user_install => @user_install, :wrappers => @wrappers, + :build_root => @build_root, :install_as_default => @install_as_default } options[:install_dir] = @install_dir if @only_install_dir diff --git a/lib/rubygems/install_update_options.rb b/lib/rubygems/install_update_options.rb index d3f55cd5ea..d01f847598 100644 --- a/lib/rubygems/install_update_options.rb +++ b/lib/rubygems/install_update_options.rb @@ -59,6 +59,12 @@ module Gem::InstallUpdateOptions end end + add_option(:"Install/Update", '--build-root DIR', + 'Temporary installation root. Useful for building', + 'packages. Do not use this when installing remote gems.') do |value, options| + options[:build_root] = File.expand_path(value) + end + add_option(:"Install/Update", '-N', '--no-document', 'Disable documentation generation') do |value, options| options[:document] = [] diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index c80981682f..6ab7b3a7d9 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -590,8 +590,17 @@ class Gem::Installer # (or use) a new bin dir under the gem_home. @bin_dir = options[:bin_dir] || Gem.bindir(gem_home) @development = options[:development] + @build_root = options[:build_root] @build_args = options[:build_args] || Gem::Command.build_args + + unless @build_root.nil? + require 'pathname' + @build_root = Pathname.new(@build_root).expand_path + @bin_dir = File.join(@build_root, options[:bin_dir] || Gem.bindir(@gem_home)) + @gem_home = File.join(@build_root,@gem_home) + alert_warning "You build with buildroot.\n Build root: #{@build_root}\n Bin dir: #{@bin_dir}\n Gem home: #{@gem_home}" + end end # DOC: Missing docs or :nodoc:. -- 2.12.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor