Class: Yast::AddInstSourceSlptypeClient

Inherits:
Client
  • Object
show all
Defined in:
src/clients/add_inst_source_slptype.rb

Overview

Client for searching for and adding SLP repositories.

The purpose is to make yast2-installation independent on yast-slp
as described in bugzilla #238680.

Instance Method Summary collapse

Instance Method Details

#mainObject


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'src/clients/add_inst_source_slptype.rb', line 7

def main
  Yast.import "SourceManager"
  Yast.import "SourceManagerSLP"

  @service = SourceManagerSLP.AddSourceTypeSLP
  if @service.nil?
    Builtins.y2milestone("No service selected, returning back...")

    return :back
  end

  Builtins.y2milestone("Trying to add repository '%1'", @service)
  # add the repository
  @createResult = SourceManager.createSource(@service)
  Builtins.y2milestone("Adding repository result: %1", @createResult)

  :next
end