Module: VagrantBindfs::Vagrant::Capabilities::Gentoo::Bindfs
- Defined in:
- lib/vagrant-bindfs/vagrant/capabilities/gentoo/bindfs.rb
Overview
:nodoc:
Class Method Summary collapse
- .bindfs_bindfs_install(machine) ⇒ Object
- .bindfs_bindfs_install_compilation_requirements(machine) ⇒ Object
- .bindfs_bindfs_install_version(machine, version) ⇒ Object
- .bindfs_bindfs_search(machine) ⇒ Object
- .bindfs_bindfs_search_version(machine, version) ⇒ Object
Class Method Details
.bindfs_bindfs_install(machine) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/vagrant-bindfs/vagrant/capabilities/gentoo/bindfs.rb', line 17 def bindfs_bindfs_install(machine) machine.guest.capability(:bindfs_package_manager_update) machine.communicate.tap do |comm| allow_bindfs_installation(comm) comm.sudo("emerge #{bindfs_package_name}") end end |
.bindfs_bindfs_install_compilation_requirements(machine) ⇒ Object
47 48 49 50 |
# File 'lib/vagrant-bindfs/vagrant/capabilities/gentoo/bindfs.rb', line 47 def bindfs_bindfs_install_compilation_requirements(machine) machine.guest.capability(:bindfs_package_manager_update) machine.communicate.sudo('emerge wget tar') end |
.bindfs_bindfs_install_version(machine, version) ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/vagrant-bindfs/vagrant/capabilities/gentoo/bindfs.rb', line 38 def bindfs_bindfs_install_version(machine, version) machine.guest.capability(:bindfs_package_manager_update) package_version = machine.guest.capability(:bindfs_bindfs_search_version, version) machine.communicate.tap do |comm| allow_bindfs_installation(comm) comm.sudo("emerge =#{bindfs_package_name}-#{package_version.shellescape}") end end |
.bindfs_bindfs_search(machine) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/vagrant-bindfs/vagrant/capabilities/gentoo/bindfs.rb', line 9 def bindfs_bindfs_search(machine) machine.guest.capability(:bindfs_package_manager_update) machine.communicate.tap do |comm| ensure_equery_is_installed(comm) return comm.test("equery -q list -po #{bindfs_package_name}") end end |
.bindfs_bindfs_search_version(machine, version) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/vagrant-bindfs/vagrant/capabilities/gentoo/bindfs.rb', line 25 def bindfs_bindfs_search_version(machine, version) machine.guest.capability(:bindfs_package_manager_update) machine.communicate.tap do |comm| ensure_equery_is_installed(comm) comm.sudo("equery -q list -po -F '$fullversion' #{bindfs_package_name} || true") do |_, output| output.strip.gsub(/\s+/, ' ').split.each do |package_version| return package_version unless package_version.match(/^#{version}/).nil? end end end false end |