Class: Y2Packager::SystemPackages

Inherits:
Object
  • Object
show all
Includes:
Yast::Logger
Defined in:
src/lib/y2packager/system_packages.rb

Overview

Preselect the system packages (drivers) from the specified repositories.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository_urls) ⇒ SystemPackages

Constructor


30
31
32
33
# File 'src/lib/y2packager/system_packages.rb', line 30

def initialize(repository_urls)
  log.info "System packages repositories: #{repository_urls.inspect}"
  @repositories = repository_urls
end

Instance Attribute Details

#repositoriesArray<String> (readonly)


22
23
24
# File 'src/lib/y2packager/system_packages.rb', line 22

def repositories
  @repositories
end

Instance Method Details

#packagesObject


35
36
37
# File 'src/lib/y2packager/system_packages.rb', line 35

def packages
  @packages ||= find_packages
end

#selectObject


39
40
41
42
43
# File 'src/lib/y2packager/system_packages.rb', line 39

def select
  return if packages.empty?
  log.info "Preselecting system packages: #{packages.inspect}"
  packages.each { |p| Yast::Pkg.PkgInstall(p) }
end