Class: Bixby::Provision::Packager::Apt

Inherits:
PackagerBase show all
Defined in:
lib/bixby/provision/dsl/packager/apt.rb

Constant Summary

Constants inherited from Base

Base::PATH

Instance Attribute Summary

Attributes inherited from Base

#manifest, #proxy

Instance Method Summary collapse

Methods inherited from Base

#get_gid, #get_group, #get_uid, #get_user, #initialize, #tap

Methods included from Util::File

#chmod, #chown, #sha256sum, #which

Constructor Details

This class inherits a constructor from Bixby::Provision::Base

Instance Method Details

#install(*packages) ⇒ Object



19
20
21
22
# File 'lib/bixby/provision/dsl/packager/apt.rb', line 19

def install(*packages)
  packages.flatten!
  logged_sudo("apt-get -qqy install " + packages.join(" "))
end

#install_repo(name, opts = {}) ⇒ Object



24
25
26
27
28
29
30
31
32
33
# File 'lib/bixby/provision/dsl/packager/apt.rb', line 24

def install_repo(name, opts={})
  name.downcase!
  if name == "epel" then
    logger.debug "#{name} isn't supported on this distro"
    return
  elsif name =~ /^https?.*\.repo$/ then
    logger.debug "repo files are not supported on this distro: #{name}"
    return
  end
end

#refreshObject



8
9
10
# File 'lib/bixby/provision/dsl/packager/apt.rb', line 8

def refresh
  sudo("apt-get -qqy update")
end

#upgrade_systemObject



12
13
14
15
16
17
# File 'lib/bixby/provision/dsl/packager/apt.rb', line 12

def upgrade_system
  logged_sudo('DEBIAN_FRONTEND=noninteractive dpkg-reconfigure grub-pc', :env => env)
  logged_sudo('apt-get -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade', :env => env)
  logged_sudo('apt-get -qqy autoremove')
  logged_sudo('apt-get -qqy autoclean')
end