Script 'mail_helper' called by ro
Hello packager,
This is just FYI. Your package was checked in in distribution "sle12"
by autobuild-member: ro.
Here comes the log...
---------------------------%<------------------------------
Hi,
here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-s390 -> sle12
Changes:
--------
--- /work/SRC/SUSE:SLE-12:GA/yast2-s390/yast2-s390.changes 2014-02-13 13:16:38.000000000 +0100
+++ /mounts/work_src_done/SLE12/yast2-s390/yast2-s390.changes 2014-02-27 15:56:15.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Feb 27 15:36:12 CET 2014 - thardeck(a)suse.de
+
+- fixed iucvterminal module to work with systemd (fate#314946)
+- 3.1.6
+
+-------------------------------------------------------------------
calling whatdependson for sle12-i586
Packages directly triggered for rebuild:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/SUSE:SLE-12:GA/yast2-s390 (Old)
and /mounts/work_src_done/SLE12/yast2-s390 (BS:build ID:33561 MAIL:yast-commit@opensuse.org) (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-s390", Maintainer is "yast-commit(a)opensuse.org"
Old:
----
yast2-s390-3.1.5.tar.bz2
New:
----
yast2-s390-3.1.6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-s390.spec ++++++
--- /var/tmp/diff_new_pack.ABlXFV/_old 2014-02-27 16:18:28.000000000 +0100
+++ /var/tmp/diff_new_pack.ABlXFV/_new 2014-02-27 16:18:28.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-s390
-Version: 3.1.5
+Version: 3.1.6
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-s390-3.1.5.tar.bz2 -> yast2-s390-3.1.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-s390-3.1.5/package/yast2-s390.changes new/yast2-s390-3.1.6/package/yast2-s390.changes
--- old/yast2-s390-3.1.5/package/yast2-s390.changes 2014-02-12 18:35:22.000000000 +0100
+++ new/yast2-s390-3.1.6/package/yast2-s390.changes 2014-02-27 15:54:56.000000000 +0100
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Feb 27 15:36:12 CET 2014 - thardeck(a)suse.de
+
+- fixed iucvterminal module to work with systemd (fate#314946)
+- 3.1.6
+
+-------------------------------------------------------------------
Wed Feb 12 15:17:53 CET 2014 - aschnell(a)suse.de
- fixed DASD probing (bnc#860398)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-s390-3.1.5/package/yast2-s390.spec new/yast2-s390-3.1.6/package/yast2-s390.spec
--- old/yast2-s390-3.1.5/package/yast2-s390.spec 2014-02-12 18:35:22.000000000 +0100
+++ new/yast2-s390-3.1.6/package/yast2-s390.spec 2014-02-27 15:54:56.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-s390
-Version: 3.1.5
+Version: 3.1.6
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-s390-3.1.5/src/include/s390/iucvterminal/ui.rb new/yast2-s390-3.1.6/src/include/s390/iucvterminal/ui.rb
--- old/yast2-s390-3.1.5/src/include/s390/iucvterminal/ui.rb 2014-02-12 18:35:22.000000000 +0100
+++ new/yast2-s390-3.1.6/src/include/s390/iucvterminal/ui.rb 2014-02-27 15:54:56.000000000 +0100
@@ -38,75 +38,10 @@
Yast.import "Integer"
# Hspacing value between most dialog fields
- @hspacing = Convert.convert(2, :from => "integer", :to => "float")
+ @hspacing = 2
# Vspacing value between most dialog fields
@vspacing = 0.5
-
- # Text field for changing settings of all HVC instances
- @TEXT_INSTANCES_ALL = IUCVTerminal.TEXT_INSTANCES_ALL
-
- # Text field for not changing the HVC emulation
- @TEXT_EMU_NO_CHANGE = IUCVTerminal.TEXT_EMU_NO_CHANGE
-
- # Default HVC emulation
- @DEFAULT_HVC_EMULATION = IUCVTerminal.DEFAULT_HVC_EMULATION
-
- # Map of HVC terminals and their according emulations
- @hvc_emulations = {}
- end
-
- # Update the HVC emulation for the "<all> instance" according to the selected
- # emulations.
- # So if all emulations are the same <all> shows this particular emulation
- # otherwise the <don't change> selection is shown to prevent overwriting.
- # @return [void]
- def UpdateHVCEmulation
- previous_emulation = Ops.get_string(
- @hvc_emulations,
- "hvc0",
- @DEFAULT_HVC_EMULATION
- )
- same_emulation = true
- terminal = ""
- # for the number of instances
- Builtins.foreach(
- Integer.RangeFrom(
- 0,
- Convert.to_integer(UI.QueryWidget(Id(:hvc_instances), :Value))
- )
- ) do |i|
- terminal = Ops.add("hvc", Builtins.tostring(i))
- if Ops.get_string(@hvc_emulations, terminal, @DEFAULT_HVC_EMULATION) != previous_emulation
- same_emulation = false
- end
- previous_emulation = Ops.get_string(
- @hvc_emulations,
- terminal,
- @DEFAULT_HVC_EMULATION
- )
- end
-
- if same_emulation
- Ops.set(@hvc_emulations, @TEXT_INSTANCES_ALL, previous_emulation)
- else
- Ops.set(@hvc_emulations, @TEXT_INSTANCES_ALL, @TEXT_EMU_NO_CHANGE)
- end
-
- # update emulation field if all is selected
- if Convert.to_string(UI.QueryWidget(Id(:hvc_instance), :Value)) == @TEXT_INSTANCES_ALL
- UI.ChangeWidget(
- Id(:hvc_emulation),
- :Value,
- Ops.get_string(
- @hvc_emulations,
- @TEXT_INSTANCES_ALL,
- @TEXT_EMU_NO_CHANGE
- )
- )
- end
-
- nil
end
# Check the "Allowed Terminal Server list" field for validity.
@@ -114,21 +49,16 @@
def IsValidTerminalSrvList
ret = false
- restrict_hvc_to_srvs = Convert.to_string(
- UI.QueryWidget(Id(:restrict_hvc_to_srvs), :Value)
- )
- if Builtins.regexpmatch(restrict_hvc_to_srvs, "[^[:lower:][:digit:],]")
+ restrict_hvc_to_srvs = UI.QueryWidget(Id(:restrict_hvc_to_srvs), :Value)
+ if restrict_hvc_to_srvs =~ /[^[[:lower:]][[:digit:]],]/
Popup.Notify(
_(
"Wrong input, only lower case letters, numbers and for separation commas are allowed."
)
)
- elsif Builtins.regexpmatch(restrict_hvc_to_srvs, "^,|,,")
+ elsif restrict_hvc_to_srvs =~ /^,|,,/
Popup.Notify(_("Comma is only a separator."))
- elsif Builtins.regexpmatch(
- restrict_hvc_to_srvs,
- "[[:lower:][:digit:]]{9,}"
- )
+ elsif restrict_hvc_to_srvs =~ /[[[:lower:]][[:digit:]]]{9,}/
Popup.Notify(_("z/VM IDs do not allow more than eight characters."))
else
ret = true
@@ -139,26 +69,19 @@
# Check the "IUCV Name" field for validity.
# @return true for valid inputs
def IsValidIucvId
- # in case of more than 99 iucv instances only 5 characters would be allowed
- # because the name is limited to eight chars
- max_length = Ops.less_than(IUCVTerminal.MAX_IUCV_TTYS, 100) ? 6 : 5
+ # Terminal id counting starts with 0
+ max_length = 8 - (UI.QueryWidget(Id(:iucv_instances), :Value) - 1).to_s.size
ret = false
- iucv_name = Convert.to_string(UI.QueryWidget(Id(:iucv_name), :Value))
+ iucv_name = UI.QueryWidget(Id(:iucv_name), :Value)
- if Builtins.regexpmatch(iucv_name, "[^[:lower:][:digit:]]")
+ if iucv_name =~ /[^[[:lower:]][[:digit:]]]/
Popup.Notify(_("Wrong IUCV ID, only lower case letters are allowed."))
- elsif Builtins.regexpmatch(
- iucv_name,
- Ops.add(
- Ops.add(".{", Builtins.tostring(Ops.add(max_length, 1))),
- ",}"
- )
- )
+ elsif iucv_name.size > max_length
Popup.Notify(
Builtins.sformat(
_("IUCV IDs cannot be longer than %1 chars."),
- max_length
+ 8
)
)
else
@@ -167,37 +90,14 @@
ret
end
- # Check if the HVC emulations differ from the ones loaded at start.
- # @return true if it has changed
- def HasEmulationChanged
- has_changed = false
- key = ""
- # for hvc instances
- Builtins.foreach(
- Integer.RangeFrom(
- 0,
- Convert.to_integer(UI.QueryWidget(Id(:hvc_instances), :Value))
- )
- ) do |i|
- key = Ops.add("hvc", Builtins.tostring(i))
- if Ops.get_string(@hvc_emulations, key, "") !=
- Ops.get(IUCVTerminal.hvc_emulations, i, "")
- has_changed = true
- raise Break
- end
- end
- has_changed
- end
-
# Update the screen according to user input.
# @return [void]
def UpdateScreen(ret)
if ret == :hvc
- # enable if restrict access is enabled too
UI.ChangeWidget(
Id(:restrict_hvc_to_srvs),
:Enabled,
- Convert.to_boolean(UI.QueryWidget(Id(:is_hvc_restricted), :Value))
+ UI.QueryWidget(Id(:is_hvc_restricted), :Value)
)
end
@@ -205,59 +105,9 @@
UI.ChangeWidget(
Id(:restrict_hvc_to_srvs),
:Enabled,
- Convert.to_boolean(UI.QueryWidget(Id(:is_hvc_restricted), :Value))
- )
- end
-
- if ret == :hvc_instances
- # only show the selected number of instances plus the entry <all>
- number = Ops.add(
- Convert.to_integer(UI.QueryWidget(Id(:hvc_instances), :Value)),
- 1
- )
- hvc_instances = Builtins.sublist(
- IUCVTerminal.POSSIBLE_HVC_INSTANCES,
- 0,
- number
- )
- UI.ChangeWidget(Id(:hvc_instance), :Items, hvc_instances)
-
- # make sure not to overwrite the emulation after adding new ones
- UpdateHVCEmulation()
- end
-
- if ret == :hvc_instance
- instance = Convert.to_string(UI.QueryWidget(Id(:hvc_instance), :Value))
- UI.ChangeWidget(
- Id(:hvc_emulation),
- :Value,
- Ops.get_string(@hvc_emulations, instance, @TEXT_EMU_NO_CHANGE)
+ UI.QueryWidget(Id(:is_hvc_restricted), :Value)
)
end
-
- if ret == :hvc_emulation
- instance = Convert.to_string(UI.QueryWidget(Id(:hvc_instance), :Value))
- emulation = Convert.to_string(
- UI.QueryWidget(Id(:hvc_emulation), :Value)
- )
-
- if emulation != @TEXT_EMU_NO_CHANGE
- if instance == @TEXT_INSTANCES_ALL
- Builtins.foreach(IUCVTerminal.POSSIBLE_HVC_INSTANCES) do |key|
- Ops.set(@hvc_emulations, key, emulation)
- end
- else
- Ops.set(@hvc_emulations, @TEXT_INSTANCES_ALL, @TEXT_EMU_NO_CHANGE)
- Ops.set(
- @hvc_emulations,
- instance,
- Convert.to_string(UI.QueryWidget(Id(:hvc_emulation), :Value))
- )
- end
- end
- UpdateHVCEmulation()
- end
-
nil
end
@@ -277,7 +127,7 @@
) +
# IUCVTerminal dialog help 4/11
_(
- "For example, if you define ten instances with the prefix "<i>lxterm</i>", the terminal IDs from <i>lxterm1</i> to <i>lxterm10</i> are available.</p>"
+ "For example, if you define ten instances with the prefix "<i>lxterm</i>", the terminal IDs from <i>lxterm0</i> to <i>lxterm9</i> are available.</p>"
) + "<p> </p>" +
# IUCVTerminal dialog help 5/11
_("<p><b>HVC</b></p>") +
@@ -311,7 +161,7 @@
content = HBox(
HSpacing(3),
VBox(
- VSpacing(Ops.add(@vspacing, 0.5)),
+ VSpacing(@vspacing + 0.5),
VBox(
CheckBoxFrame(
Id(:iucv),
@@ -339,7 +189,7 @@
VSpacing(@vspacing)
)
),
- VSpacing(Ops.add(@vspacing, 0.5)),
+ VSpacing(@vspacing + 0.5),
CheckBoxFrame(
Id(:hvc),
Opt(:notify),
@@ -374,30 +224,14 @@
""
)
),
- VSpacing(@vspacing),
- HBox(
- ComboBox(
- Id(:hvc_instance),
- Opt(:notify, :hstretch),
- _("Select I&nstance"),
- IUCVTerminal.POSSIBLE_HVC_INSTANCES
- ),
- HSpacing(1),
- ComboBox(
- Id(:hvc_emulation),
- Opt(:notify, :hstretch),
- _("Select &Emulation"),
- IUCVTerminal.HVC_EMULATIONS
- )
- ),
- VSpacing(Ops.add(@vspacing, 0.7)),
+ VSpacing(@vspacing + 0.7),
Left(
CheckBox(
Id(:show_kernel_out_on_hvc),
_("route &kernel messages to hvc0")
)
),
- VSpacing(Ops.add(@vspacing, 0.5))
+ VSpacing(@vspacing + 0.5)
),
HSpacing(@hspacing)
)
@@ -418,28 +252,6 @@
Wizard.HideBackButton
Wizard.SetAbortButton(:cancel, Label.CancelButton)
- # initialize hvc_emulations with default value
- Builtins.foreach(IUCVTerminal.POSSIBLE_HVC_INSTANCES) do |key|
- @hvc_emulations = Builtins.add(
- @hvc_emulations,
- key,
- @DEFAULT_HVC_EMULATION
- )
- end
-
- if Ops.greater_than(Builtins.size(IUCVTerminal.hvc_emulations), 0)
- i = 0
- Builtins.foreach(IUCVTerminal.hvc_emulations) do |emulation|
- Ops.set(
- @hvc_emulations,
- Ops.add("hvc", Builtins.tostring(i)),
- emulation
- )
- i = Ops.add(i, 1)
- end
- UpdateHVCEmulation()
- end
-
UI.ChangeWidget(
Id(:show_kernel_out_on_hvc),
:Value,
@@ -455,31 +267,26 @@
end
# initialize screen
- if Ops.greater_than(IUCVTerminal.iucv_instances, 0)
+ if IUCVTerminal.iucv_instances > 0
UI.ChangeWidget(Id(:iucv), :Value, true)
UI.ChangeWidget(
- Id(:iucv_instances),
- :Value,
- IUCVTerminal.iucv_instances
+ Id(:iucv_instances), :Value, IUCVTerminal.iucv_instances
)
end
- if Ops.greater_than(IUCVTerminal.hvc_instances, 0)
+ if IUCVTerminal.hvc_instances > 0
UI.ChangeWidget(Id(:hvc), :Value, true)
UI.ChangeWidget(Id(:hvc_instances), :Value, IUCVTerminal.hvc_instances)
end
- if IUCVTerminal.iucv_name != ""
+ unless IUCVTerminal.iucv_name.empty?
UI.ChangeWidget(Id(:iucv_name), :Value, IUCVTerminal.iucv_name)
end
- UpdateScreen(:hvc_instances)
- UpdateScreen(:hvc_instance)
- UpdateScreen(:iucv)
UpdateScreen(:hvc)
ret = nil
begin
- ret = Convert.to_symbol(UI.UserInput)
+ ret = UI.UserInput
UpdateScreen(ret)
IsValidTerminalSrvList() if ret == :restrict_hvc_to_srvs
@@ -487,50 +294,40 @@
IsValidIucvId() if ret == :iucv_name
# check for changes on final user actions
- if Builtins.contains([:back, :abort, :cancel, :next, :ok, :finish], ret)
+ if [:back, :abort, :cancel, :next, :ok, :finish].include?(ret)
IUCVTerminal.modified = IUCVTerminal.iucv_instances == 0 &&
- Convert.to_boolean(UI.QueryWidget(Id(:iucv), :Value)) ||
+ UI.QueryWidget(Id(:iucv), :Value) ||
IUCVTerminal.iucv_instances != 0 &&
- !Convert.to_boolean(UI.QueryWidget(Id(:iucv), :Value)) ||
+ !UI.QueryWidget(Id(:iucv), :Value) ||
IUCVTerminal.iucv_instances != 0 &&
IUCVTerminal.iucv_instances !=
- Convert.to_integer(UI.QueryWidget(Id(:iucv_instances), :Value)) ||
+ UI.QueryWidget(Id(:iucv_instances), :Value) ||
IUCVTerminal.iucv_name !=
- Convert.to_string(UI.QueryWidget(Id(:iucv_name), :Value)) ||
+ UI.QueryWidget(Id(:iucv_name), :Value) ||
IUCVTerminal.hvc_instances != 0 &&
IUCVTerminal.hvc_instances !=
- Convert.to_integer(UI.QueryWidget(Id(:hvc_instances), :Value)) ||
+ UI.QueryWidget(Id(:hvc_instances), :Value) ||
IUCVTerminal.hvc_instances == 0 &&
- Convert.to_boolean(UI.QueryWidget(Id(:hvc), :Value)) ||
+ UI.QueryWidget(Id(:hvc), :Value) ||
IUCVTerminal.hvc_instances != 0 &&
- !Convert.to_boolean(UI.QueryWidget(Id(:hvc), :Value)) ||
+ !UI.QueryWidget(Id(:hvc), :Value) ||
IUCVTerminal.show_kernel_out_on_hvc !=
- Convert.to_boolean(
- UI.QueryWidget(Id(:show_kernel_out_on_hvc), :Value)
- ) ||
+ UI.QueryWidget(Id(:show_kernel_out_on_hvc), :Value) ||
IUCVTerminal.restrict_hvc_to_srvs !=
- Convert.to_string(
- UI.QueryWidget(Id(:restrict_hvc_to_srvs), :Value)
- ) ||
+ UI.QueryWidget(Id(:restrict_hvc_to_srvs), :Value) ||
IUCVTerminal.restrict_hvc_to_srvs != "" &&
- !Convert.to_boolean(
- UI.QueryWidget(Id(:is_hvc_restricted), :Value)
- ) ||
- HasEmulationChanged() &&
- Convert.to_boolean(UI.QueryWidget(Id(:hvc), :Value))
+ !UI.QueryWidget(Id(:is_hvc_restricted), :Value)
# if settings were changed don't exit without asking
- if Builtins.contains([:back, :abort, :cancel], ret) &&
+ if [:back, :abort, :cancel].include?(ret) &&
IUCVTerminal.modified &&
!Popup.YesNo(_("Really leave without saving?"))
ret = :again
end
- if Builtins.contains([:next, :ok, :finish], ret)
+ if [:next, :ok, :finish].include?(ret)
# check iucv id
- iucv_name = Convert.to_string(
- UI.QueryWidget(Id(:iucv_name), :Value)
- )
+ iucv_name = UI.QueryWidget(Id(:iucv_name), :Value)
if !IsValidIucvId() || iucv_name == ""
UI.SetFocus(:iucv_name)
Popup.Notify(_("The IUCV ID is not valid."))
@@ -538,14 +335,10 @@
end
# check restrict_hvc_to_srvs and make sure they doesn't end with a comma
- if Convert.to_boolean(
- UI.QueryWidget(Id(:is_hvc_restricted), :Value)
- )
- restrict_hvc_to_srvs = Convert.to_string(
- UI.QueryWidget(Id(:restrict_hvc_to_srvs), :Value)
- )
+ if UI.QueryWidget(Id(:is_hvc_restricted), :Value)
+ restrict_hvc_to_srvs = UI.QueryWidget(Id(:restrict_hvc_to_srvs), :Value)
if !IsValidTerminalSrvList() || restrict_hvc_to_srvs == "" ||
- Builtins.regexpmatch(restrict_hvc_to_srvs, ",$")
+ restrict_hvc_to_srvs =~ /,$/
UI.SetFocus(:restrict_hvc_to_srvs)
Popup.Notify(_("The Terminal Servers are not valid."))
ret = :again
@@ -553,29 +346,20 @@
end
end
end
- end while !Builtins.contains([:back, :abort, :cancel, :next, :ok, :finish], ret)
+ end while ![:back, :abort, :cancel, :next, :ok, :finish].include?(ret)
# commit changes
- if IUCVTerminal.modified && (ret == :next || ret == :ok || ret == :finish)
+ if IUCVTerminal.modified && [:next, :ok, :finish].include?(ret)
# set instances to zero if it is disabled
- current_hvc_instances = Convert.to_boolean(
- UI.QueryWidget(Id(:hvc), :Value)
- ) ?
- Convert.to_integer(UI.QueryWidget(Id(:hvc_instances), :Value)) :
- 0
+ current_hvc_instances = UI.QueryWidget(Id(:hvc), :Value) ?
+ UI.QueryWidget(Id(:hvc_instances), :Value) : 0
# no need to provide allowed terminal servers if disabled
- current_restrict_hvc_to_srvs = Convert.to_boolean(
- UI.QueryWidget(Id(:is_hvc_restricted), :Value)
- ) ?
- Convert.to_string(UI.QueryWidget(Id(:restrict_hvc_to_srvs), :Value)) :
- ""
+ current_restrict_hvc_to_srvs = UI.QueryWidget(Id(:is_hvc_restricted), :Value) ?
+ UI.QueryWidget(Id(:restrict_hvc_to_srvs), :Value) : ""
# check if the bootloader settings need to be adjusted
IUCVTerminal.has_bootloader_changed = IUCVTerminal.restrict_hvc_to_srvs != current_restrict_hvc_to_srvs ||
- IUCVTerminal.show_kernel_out_on_hvc !=
- Convert.to_boolean(
- UI.QueryWidget(Id(:show_kernel_out_on_hvc), :Value)
- )
+ IUCVTerminal.show_kernel_out_on_hvc != UI.QueryWidget(Id(:show_kernel_out_on_hvc), :Value)
if IUCVTerminal.has_bootloader_changed
Popup.Notify(
@@ -585,32 +369,12 @@
IUCVTerminal.hvc_instances = current_hvc_instances
# set instances to zero if it is disabled
- IUCVTerminal.iucv_instances = Convert.to_boolean(
- UI.QueryWidget(Id(:iucv), :Value)
- ) ?
- Convert.to_integer(UI.QueryWidget(Id(:iucv_instances), :Value)) :
- 0
+ IUCVTerminal.iucv_instances = UI.QueryWidget(Id(:iucv), :Value) ?
+ UI.QueryWidget(Id(:iucv_instances), :Value) : 0
- IUCVTerminal.iucv_name = Convert.to_string(
- UI.QueryWidget(Id(:iucv_name), :Value)
- )
+ IUCVTerminal.iucv_name = UI.QueryWidget(Id(:iucv_name), :Value)
IUCVTerminal.restrict_hvc_to_srvs = current_restrict_hvc_to_srvs
- IUCVTerminal.show_kernel_out_on_hvc = Convert.to_boolean(
- UI.QueryWidget(Id(:show_kernel_out_on_hvc), :Value)
- )
- # commit hvc emulations
- if Ops.greater_than(IUCVTerminal.hvc_instances, 0)
- hvc_emulation_list = []
- key = ""
- Builtins.foreach(Integer.RangeFrom(0, IUCVTerminal.hvc_instances)) do |i|
- key = Ops.add("hvc", Builtins.tostring(i))
- hvc_emulation_list = Builtins.add(
- hvc_emulation_list,
- Ops.get_string(@hvc_emulations, key, @DEFAULT_HVC_EMULATION)
- )
- end
- IUCVTerminal.hvc_emulations = deep_copy(hvc_emulation_list)
- end
+ IUCVTerminal.show_kernel_out_on_hvc = UI.QueryWidget(Id(:show_kernel_out_on_hvc), :Value)
end
ret
end
@@ -619,17 +383,11 @@
# The whole squence
# @return sequence result
def IUCVTerminalSequence
- ret = nil
Wizard.CreateDialog
Wizard.SetDesktopIcon("iucvterminal")
IUCVTerminal.Read
- ret = TerminalDialog()
- # only write during
- IUCVTerminal.Write if ret == :next || ret == :finish || ret == :ok
+ IUCVTerminal.Write if [:next, :ok, :finish].include?(TerminalDialog())
UI.CloseDialog
-
-
- ret
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-s390-3.1.5/src/modules/IUCVTerminal.rb new/yast2-s390-3.1.6/src/modules/IUCVTerminal.rb
--- old/yast2-s390-3.1.5/src/modules/IUCVTerminal.rb 2014-02-12 18:35:22.000000000 +0100
+++ new/yast2-s390-3.1.6/src/modules/IUCVTerminal.rb 2014-02-27 15:54:56.000000000 +0100
@@ -27,6 +27,7 @@
require "yast"
module Yast
+ import "Service"
class IUCVTerminalClass < Module
def main
textdomain "s390"
@@ -37,34 +38,17 @@
Yast.import "Progress"
Yast.import "Integer"
Yast.import "Bootloader"
+ Yast.import "Service"
- # Maximal allowed IUCV ttys, 999 is the absolute maximum
- @MAX_IUCV_TTYS = 99
+ # Maximal allowed IUCV ttys
+ @MAX_IUCV_TTYS = 999
- # Default Emulation for HVC
- @DEFAULT_HVC_EMULATION = "linux"
+ # Maximal allowed HVC ttys (there are only 8 hvc devices)
+ @MAX_HVC_TTYS = 8
- # Text field for changing settings of all HVC instances
- @TEXT_INSTANCES_ALL = _("<all>")
-
- # Text field for not changing the HVC emulation
- @TEXT_EMU_NO_CHANGE = _("<don't change>")
-
- # List of all possible HVC terminals
- @POSSIBLE_HVC_INSTANCES = [
- @TEXT_INSTANCES_ALL,
- "hvc0",
- "hvc1",
- "hvc2",
- "hvc3",
- "hvc4",
- "hvc5",
- "hvc6",
- "hvc7"
- ]
-
- # List of all HVC emulations
- @HVC_EMULATIONS = [@TEXT_EMU_NO_CHANGE, "linux", "dumb", "xterm", "vt220"]
+ # Systemd service template prefix
+ @HVC_PREFIX = "serial-getty"
+ @IUCV_PREFIX = "iucvtty"
# Data was modified?
@modified = false
@@ -78,10 +62,6 @@
# Number of HVC instances
@hvc_instances = 0
- # List of emulations per HVC device (first entry for hvc0, second for
- # hvc1 and so on)
- @hvc_emulations = []
-
# Show kernel output on hvc0?
@show_kernel_out_on_hvc = false
@@ -90,6 +70,70 @@
# Has the bootloader configuration changed?
@has_bootloader_changed = false
+
+ # getty.target.wants directory
+ @getty_conf_dir = "/etc/systemd/system/getty.target.wants/"
+ end
+
+ def tty_entries(prefix)
+ Dir.entries((a)getty_conf_dir).select{ |e| e =~ /^#{prefix}@.+\.service$/ }
+ end
+
+ def get_tty_num(prefix)
+ tty_entries(prefix).count
+ end
+
+ def get_iucv_num
+ get_tty_num(@IUCV_PREFIX)
+ end
+
+ def get_hvc_num
+ get_tty_num(@HVC_PREFIX)
+ end
+
+ def get_iucv_name
+ entry = tty_entries((a)IUCV_PREFIX).sort.first
+ if entry
+ match = entry.scan(/^#{@IUCV_PREFIX}@(.+)0\.service$/).first
+ name = match.first if match
+ end
+ name ||= @iucv_name
+ end
+
+ def setup_iucv(target_num)
+ target_num = @MAX_IUCV_TTYS if target_num > @MAX_IUCV_TTYS
+ current_name = get_iucv_name
+
+ # make sure to remove the old entries if the terminal name has changed
+ if current_name != @iucv_name
+ setup_tty_instances(0, @IUCV_PREFIX, current_name)
+ end
+ setup_tty_instances(target_num, @IUCV_PREFIX, @iucv_name)
+ end
+
+ def setup_hvc(target_num)
+ target_num = @MAX_HVC_TTYS if target_num > @MAX_HVC_TTYS
+ setup_tty_instances(target_num, @HVC_PREFIX, "hvc")
+ end
+
+ def setup_tty_instances(target_num, prefix, name)
+ existing_num = get_tty_num(prefix) - 1
+ target_num -= 1
+ return if existing_num == target_num
+
+ if target_num > existing_num
+ for i in (existing_num + 1)..target_num do
+ service_name = "#{prefix}(a)#{name}#{i}.service"
+ SCR.Execute(path(".target.bash"), "systemctl enable #{service_name}")
+ SCR.Execute(path(".target.bash"), "systemctl start #{service_name}")
+ end
+ else
+ existing_num.downto(target_num + 1) do |i|
+ service_name = "#{prefix}(a)#{name}#{i}.service"
+ SCR.Execute(path(".target.bash"), "systemctl disable #{service_name}")
+ SCR.Execute(path(".target.bash"), "systemctl stop #{service_name}")
+ end
+ end
end
# Read all settings
@@ -126,68 +170,12 @@
# Load IUCVtty settings
Progress.NextStage
- if FileUtils.Exists("/etc/inittab")
- @iucv_instances = 0
- if SCR.Read(path(".etc.inittab.i001")) != nil
- id = ""
- # count the iucvtty instances
- Builtins.foreach(Integer.RangeFrom(1, Ops.add(@MAX_IUCV_TTYS, 1))) do |i|
- id = "i"
- if Ops.less_than(i, 10)
- id = Ops.add(id, "00")
- elsif Ops.less_than(i, 100)
- id = Ops.add(id, "0")
- end
- if SCR.Read(
- Ops.add(path(".etc.inittab"), Ops.add(id, Builtins.tostring(i)))
- ) != nil
- @iucv_instances = Ops.add(@iucv_instances, 1)
- else
- raise Break
- end
- end
- # extract IUCVtty Terminal name
- if Ops.greater_than(@iucv_instances, 0)
- value = Convert.to_string(SCR.Read(path(".etc.inittab") + "i001"))
- # remove the following number
- temp = Builtins.regexptokenize(value, " ([a-z0-9]{1,7})1$")
- @iucv_name = Ops.get(temp, 0, "lxterm")
- end
- end
- end
+ @iucv_instances = get_iucv_num
+ @iucv_name = get_iucv_name
# Load HVC settings
Progress.NextStage
- if FileUtils.Exists("/etc/inittab")
- @hvc_instances = 0
- if SCR.Read(path(".etc.inittab.h0")) != nil
- id = ""
- console2 = nil
- # count the hvc instances
- Builtins.foreach(Integer.RangeFrom(0, 8)) do |i|
- id = "h"
- console2 = Convert.to_string(
- SCR.Read(
- Ops.add(path(".etc.inittab"), Ops.add(id, Builtins.tostring(i)))
- )
- )
- if console2 != nil
- @hvc_instances = Ops.add(@hvc_instances, 1)
- # read emulation
- @hvc_emulations = Convert.convert(
- Builtins.merge(
- @hvc_emulations,
- Builtins.regexptokenize(console2, " (.{4,5})$")
- ),
- :from => "list",
- :to => "list <string>"
- )
- else
- raise Break
- end
- end
- end
- end
+ @hvc_instances = get_hvc_num
# Extract settings from the kernel parameters
Progress.NextStage
@@ -235,11 +223,11 @@
# Write all settings
# @return true on success
def Write
- return true if !@modified
+ return true unless @modified
# Inittab write dialog caption
caption = _("Saving IUCV Terminal Configuration")
- steps = 2
+ steps = 3
Progress.New(
caption,
@@ -251,9 +239,7 @@
# Progress stage 2/4
_("Write HVC settings"),
# Progress stage 3/4
- _("Write kernel parameters"),
- # Progress stage 4/4
- _("Initialize Init")
+ _("Write kernel parameters")
],
[
# Progress step 1/4
@@ -262,8 +248,6 @@
_("Writing HVC settings..."),
# Progress step 3/4
_("Writing kernel parameters..."),
- # Progress step 4/4
- _("Initializing Init..."),
# Progress finished
_("Finished")
],
@@ -272,65 +256,11 @@
# save IUCVtty settings
Progress.NextStage
- id = ""
- Builtins.foreach(Integer.RangeFrom(1, Ops.add(@MAX_IUCV_TTYS, 1))) do |i|
- id = "i"
- if Ops.less_than(i, 10)
- id = Ops.add(id, "00")
- elsif Ops.less_than(i, 100)
- id = Ops.add(id, "0")
- end
- if Ops.less_or_equal(i, @iucv_instances)
- # the maximum for terminal ids are 8 characters
- SCR.Write(
- Ops.add(path(".etc.inittab"), Ops.add(id, Builtins.tostring(i))),
- Ops.add(
- Ops.add("2345:respawn:/usr/bin/iucvtty ", @iucv_name),
- Builtins.tostring(i)
- )
- )
- else
- # delete all other iucv inittab entries
- SCR.Write(
- Ops.add(path(".etc.inittab"), Ops.add(id, Builtins.tostring(i))),
- nil
- )
- end
- end
+ setup_iucv(@iucv_instances)
# save HVC settings
Progress.NextStage
- console = ""
- Builtins.foreach(Integer.RangeFrom(0, 8)) do |i|
- id = "h"
- # hvc starts with zero instead of 1
- if Ops.less_than(i, @hvc_instances)
- # this console was build according to the documentation from 2009 but SP2 seems to have already inittab entries
- # for HVC so using the same syntax
- # console = "2345:respawn:/sbin/agetty -L 9600 hvc" + tostring(i) + " " + hvc_emulations[i]:DEFAULT_HVC_EMULATION;
-
- console = Ops.add(
- Ops.add(
- Ops.add("2345:respawn:/sbin/ttyrun hvc", Builtins.tostring(i)),
- " /sbin/agetty -L 9600 %t "
- ),
- Ops.get(@hvc_emulations, i, @DEFAULT_HVC_EMULATION)
- )
- SCR.Write(
- Ops.add(path(".etc.inittab"), Ops.add(id, Builtins.tostring(i))),
- console
- )
- else
- # delete all other hvc inittab entries
- SCR.Write(
- Ops.add(path(".etc.inittab"), Ops.add(id, Builtins.tostring(i))),
- nil
- )
- end
- end
-
- # flush cache
- SCR.Write(path(".etc.inittab"), nil)
+ setup_hvc(@hvc_instances)
# writing Kernel parameters
Progress.NextStage
@@ -362,32 +292,15 @@
Progress.set(old_progress)
end
- # initialize init system
- Progress.NextStage
- cmd = "init q"
- Builtins.y2milestone("Running command %1", cmd)
- output = Convert.to_map(SCR.Execute(path(".target.bash_output"), cmd))
- message = Ops.add(
- Ops.get_string(output, "stdout", ""),
- Ops.get_string(output, "stderr", "")
- )
- Builtins.y2milestone("%1 output: %2", cmd, message)
-
Progress.NextStage
true
end
publish :variable => :MAX_IUCV_TTYS, :type => "const integer"
- publish :variable => :DEFAULT_HVC_EMULATION, :type => "const string"
- publish :variable => :TEXT_INSTANCES_ALL, :type => "const string"
- publish :variable => :TEXT_EMU_NO_CHANGE, :type => "const string"
- publish :variable => :POSSIBLE_HVC_INSTANCES, :type => "const list <string>"
- publish :variable => :HVC_EMULATIONS, :type => "const list <string>"
publish :variable => :modified, :type => "boolean"
publish :variable => :iucv_instances, :type => "integer"
publish :variable => :iucv_name, :type => "string"
publish :variable => :hvc_instances, :type => "integer"
- publish :variable => :hvc_emulations, :type => "list <string>"
publish :variable => :show_kernel_out_on_hvc, :type => "boolean"
publish :variable => :restrict_hvc_to_srvs, :type => "string"
publish :variable => :has_bootloader_changed, :type => "boolean"
continue with "q"...
Checked in at Thu Feb 27 16:18:40 CET 2014 by ro
Remember to have fun...
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org