29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
# File 'src/lib/installation/clients/inst_installation_options.rb', line 29
def main
Yast.import "UI"
textdomain "installation"
Yast.import "AddOnProduct"
Yast.import "Installation"
Yast.import "InstData"
Yast.import "Linuxrc"
Yast.import "Mode"
Yast.import "PackageCallbacks"
Yast.import "Popup"
Yast.import "ProductControl"
Yast.import "Stage"
Yast.import "Wizard"
Yast.import "ProductFeatures"
Yast.import "PackagesProposal"
Yast.include self, "packager/storage_include.rb"
Yast.include self, "installation/misc.rb"
InstData.start_mode = Mode.mode
AddOnProduct.skip_add_ons = false
ReleaseHDDUsedAsInstallationSource()
if Mode.autoinst
Builtins.y2milestone("Autoinst -> returning `auto")
return :auto
end
@show_online_repositories = ProductFeatures.GetBooleanFeature(
"globals",
"show_online_repositories"
)
Installation.productsources_selected = false if @show_online_repositories != true
return :auto unless @show_online_repositories
Wizard.SetContents(
_("Installation Options"),
InstOptionsDialogContent(),
InstOptionsDialogHelp(),
true,
true
)
Builtins.y2milestone(
"Umount result: %1, inst mode: %2",
Linuxrc.InstallInf("umount_result"),
Linuxrc.InstallInf("InstMode")
)
AdjustStepsAccordingToInstallationSettings()
loop do
@ret = UI.UserInput
Builtins.y2milestone("ret: %1", @ret)
case @ret
when :add_on
if UI.WidgetExists(Id(:add_on))
Installation.add_on_selected = UI.QueryWidget(Id(:add_on), :Value)
Builtins.y2milestone("add_on_selected: %1", Installation.add_on_selected)
AdjustStepsAccordingToInstallationSettings()
end
when :productsources
if UI.WidgetExists(Id(:productsources))
Installation.productsources_selected = UI.QueryWidget(Id(:productsources), :Value)
Builtins.y2milestone(
"productsources_selected: %1",
Installation.productsources_selected
)
AdjustStepsAccordingToInstallationSettings()
end
when :abort
return :abort if Popup.ConfirmAbort(Stage.initial ? :painless : :incomplete)
end
break if [:back, :next].include?(@ret)
end
case @ret
when :next
Builtins.y2milestone(
"Disabled modules: %1",
ProductControl.GetDisabledModules
)
when :back, :finish
Builtins.y2milestone("Returning: %1", @ret)
return @ret
end
if Installation.add_on_selected || Installation.productsources_selected
@inc_ret = Convert.to_symbol(WFM.CallFunction("inst_network_check", []))
Builtins.y2milestone("inst_network_check ret: %1", @inc_ret)
return @inc_ret if [:back, :abort].include?(@inc_ret)
end
Wizard.SetContents(
_("Initializing"),
Label(_("Initializing...")),
"",
false,
false
)
UpdateWizardSteps()
@ret = ProductControl.RunFrom(ProductControl.CurrentStep + 1, false)
@ret = :finish if @ret == :next
@ret
end
|