Class: Yast::Packager::CFA::ZyppConf

Inherits:
CFA::BaseModel
  • Object
show all
Defined in:
src/lib/packager/cfa/zypp_conf.rb

Overview

Represents a Zypper configuration file.

Constant Summary collapse

PARSER =

Configuration parser

::CFA::AugeasParser.new("puppet.lns")
PATH =

Path to configuration file

"/etc/zypp/zypp.conf".freeze

Instance Method Summary collapse

Constructor Details

#initialize(file_handler: nil) ⇒ ZyppConf

Returns a new instance of ZyppConf


15
16
17
# File 'src/lib/packager/cfa/zypp_conf.rb', line 15

def initialize(file_handler: nil)
  super(PARSER, PATH, file_handler: file_handler)
end

Instance Method Details

#section(name) ⇒ Object


31
32
33
# File 'src/lib/packager/cfa/zypp_conf.rb', line 31

def section(name)
  data[name]
end

#set_minimalistic!Object

Set options to keep a minimalistic package selection


20
21
22
23
24
25
26
27
28
29
# File 'src/lib/packager/cfa/zypp_conf.rb', line 20

def set_minimalistic!
  tree = data["main"]
  if !tree
    tree = ::CFA::AugeasTree.new
    data["main"] = tree
  end
  generic_set("solver.onlyRequires", "true", tree)
  generic_set("rpm.install.excludedocs", "yes", tree)
  generic_set("multiversion", nil, tree)
end