Class: Yast::InstSwSelectClient

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

Overview

Displays software selection screen. Show radioboxes for software main categories. Let the user select the software.

Instance Method Summary collapse

Instance Method Details

#mainObject


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'src/clients/inst_sw_select.rb', line 6

def main
  Yast.import "Pkg"
  textdomain "packager"

  Yast.import "Packages"
  Yast.import "PackagesUI"

  @ret = :again

  while @ret == :again
    # add additional (internal) packages, like kernel etc.
    # they are added by proposal!!!! (#155819)
    # Pkg::DoProvide (Packages::ComputeSystemPackageList());
    Pkg.PkgSolve(false)

    while @ret == :again
      # display the installation summary in case there is a solver problem (bnc#436721)
      if Ops.greater_than(Packages.solve_errors, 0)
        Builtins.y2milestone("Unresolved conflicts, using summary mode")
        @ret = PackagesUI.RunPackageSelector("mode" => :summaryMode)
      else
        @ret = PackagesUI.RunPatternSelector
      end

      Builtins.y2milestone("Package selector result: %1", @ret)

      next unless @ret == :accept
      # Package proposal cache has to be reset and recreated
      # from scratch. See BNC #436925.
      Packages.ResetProposalCache

      Packages.base_selection_modified = true
      @ret = :next
      Packages.solve_errors = 0 # all have been either solved
      # or marked to ignore
    end
  end

  @ret
end