Method: Zypper::Config#initialize

Defined in:
lib/zypper/config.rb

#initialize(params = {}) ⇒ Config

Constructor

Possible parameters (string) :root Defines the changed root environment, default '/' (boolean) :auto_import_gpg Automatically trust (and import) new GPG keys, default true (boolean) :refresh_repo Adds new repositories with autorefresh flag, default true (string) :chroot_method Defines which zypper is used; 'local' uses the local zypper with changed root directory specified as --root parameter whereas 'chroot' uses chroot binary and calls zypper directly in the :root directory. This can be ignored if changed :root is not defined (boolean :auto_agree_with_licenses automatically accept all licenses, otherwise such packages cannot be installed



35
36
37
38
39
40
41
42
# File 'lib/zypper/config.rb', line 35

def initialize(params = {})
  self.root = (params[:root] || DEFAULT_ROOT)
  self.chroot_method = (params[:chroot_method] || DEFAULT_CHROOT_METHOD)

  @auto_import_gpg = (params[:auto_import_gpg] || DEFAULT_IMPORT_GPG)
  @refresh_repo = (params[:refresh_repo] || DEFAULT_REFRESH_REPO)
  @auto_agree_with_licenses = (params[:auto_agree_with_licenses] || DEFAULT_AUTO_AGREE_WITH_LICENSES)
end