Module: Gem::Portage::InstallWithPortage

Includes:
GemSpecFetcher
Defined in:
lib/g-gem/gems_commands_with_portage.rb

Instance Method Summary collapse

Instance Method Details

#default_portage_argsObject



6
7
8
# File 'lib/g-gem/gems_commands_with_portage.rb', line 6

def default_portage_args
  %w(--verbose)
end

#execute_with_portageObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/g-gem/gems_commands_with_portage.rb', line 10

def execute_with_portage
  fail ("  Please specify a gem name on the command line (e.g. gem \#{command} GEMNAME)\n  As with the ebuild command you can also specify a portage dependency-atom.\n  (see ebuild(5) under 'DEPEND Atoms' for more info)                                                       \n\n  Note that everything after the '--portage' option is ignored by this \n  command and is used as arguments for the emerge program.\n  EOE\n  ecmd = Gem::Portage::EbuildCommand.new :command => %w(generate digest),\n                                         :overwrite => false,\n                                         :force => false,\n                                         :test_phase => options[:test],\n                                         :install_dir => options[:install_dir],\n                                         :domain => options[:domain],\n                                         :dependencies => options[:include_dependencies]\n  self.portage_args += %w(--nodeps) if options[:ignore_dependencies]\n  ENV['USE'] = \"\#{ENV['USE']} doc\" if options[:generate_rdoc]\n  ENV['FEATURES'] = \"\#{ENV['FEATURES']} test\" if options[:test]\n  atoms = Gem::Portage::DependencyAtom.parse_list(options[:args])\n  ecmd.execute_on(atoms)\n  atoms_s = atoms.inject(\"\") { |s, a| s + \" \" + a.to_s }\n  system(\"emerge \#{portage_args_s} \#{atoms_s}\")\nend\n").head_indented if options[:args].empty?