Hello community, here is the log from the commit of package yast2-country for openSUSE:Factory checked in at 2019-05-10 09:13:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-country (Old) and /work/SRC/openSUSE:Factory/.yast2-country.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-country" Fri May 10 09:13:27 2019 rev:202 rq:701807 version:4.1.12 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-country/yast2-country.changes 2019-03-21 09:51:50.906812414 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-country.new.5148/yast2-country.changes 2019-05-10 09:13:29.995669098 +0200 @@ -1,0 +2,7 @@ +Thu May 9 13:42:57 CEST 2019 - [email protected] + +- Fix: Keyboard language cannot be changed in textmode + (bsc#1120957). +- 4.1.12 + +------------------------------------------------------------------- Old: ---- yast2-country-4.1.11.tar.bz2 New: ---- yast2-country-4.1.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-country.spec ++++++ --- /var/tmp/diff_new_pack.lqPkZN/_old 2019-05-10 09:13:30.527670616 +0200 +++ /var/tmp/diff_new_pack.lqPkZN/_new 2019-05-10 09:13:30.531670628 +0200 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 4.1.11 +Version: 4.1.12 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-country-4.1.11.tar.bz2 -> yast2-country-4.1.12.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.1.11/Dockerfile new/yast2-country-4.1.12/Dockerfile --- old/yast2-country-4.1.11/Dockerfile 2019-03-19 11:32:01.000000000 +0100 +++ new/yast2-country-4.1.12/Dockerfile 2019-05-09 15:31:20.000000000 +0200 @@ -1,3 +1,3 @@ -FROM yastdevel/ruby +FROM registry.opensuse.org/yast/head/containers/yast-ruby:latest COPY . /usr/src/app diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.1.11/keyboard/src/modules/Keyboard.rb new/yast2-country-4.1.12/keyboard/src/modules/Keyboard.rb --- old/yast2-country-4.1.11/keyboard/src/modules/Keyboard.rb 2019-03-19 11:32:01.000000000 +0100 +++ new/yast2-country-4.1.12/keyboard/src/modules/Keyboard.rb 2019-05-09 15:31:20.000000000 +0200 @@ -177,6 +177,10 @@ # @ckb_cmd = "" + # The serial console keyboard command + # + @skb_cmd = "" + # The X11 keyboard command # @xkb_cmd = "" @@ -553,7 +557,10 @@ end # loadkeys is already escaped and it is multiple params inside, so cannot be escaped here - @ckb_cmd = "/usr/bin/loadkeys #{loadkeys_devices} #{keymap.shellescape}" + devices = loadkeys_devices("tty") + @ckb_cmd = "/usr/bin/loadkeys #{devices} #{keymap.shellescape}" + devices = loadkeys_devices("ttyS") + @skb_cmd = "/usr/bin/loadkeys #{devices} #{keymap.shellescape}" # X11 command... # do not try to run this with remote X display @@ -980,8 +987,6 @@ # # @param Keyboard language e.g. "english-us" # - # @return The loadkeys command that has been executed to do it. - # (also stored in Keyboard::ckb_cmd) def SetConsole(keyboard) if Mode.test Builtins.y2milestone("Test mode - NOT setting keyboard") @@ -992,11 +997,17 @@ Builtins.y2milestone("Setting console keyboard to: <%1>", @current_kbd) Builtins.y2milestone("loadkeys command: <%1>", @ckb_cmd) - SCR.Execute(path(".target.bash"), @ckb_cmd) + + # It could be that for seriell tty's the keyboard cannot be set. So it will + # be done separately in order to ensure that setting console keyboard + # will be done successfully in the previous call. + Builtins.y2milestone("Setting seriell console keyboard to: <%1>", @current_kbd) + Builtins.y2milestone("loadkeys command: <%1>", @skb_cmd) + SCR.Execute(path(".target.bash"), @skb_cmd) + UI.SetKeyboard end - @ckb_cmd end # SetConsole() @@ -1332,7 +1343,7 @@ publish :function => :Modified, :type => "boolean ()" publish :function => :Save, :type => "void ()" publish :function => :Name, :type => "string ()" - publish :function => :SetConsole, :type => "string (string)" + publish :function => :SetConsole, :type => "void (string)" publish :function => :SetX11, :type => "string (string)" publish :function => :MakeProposal, :type => "string (boolean, boolean)" publish :function => :CalledRestore, :type => "boolean ()" @@ -1461,12 +1472,12 @@ # String to specify all the relevant devices in a loadkeys command # - # It includes all tty devices (bsc#1010938) except those representing - # AMBA devices (bsc#1080222). + # It includes all tty[0-9]* and ttyS[0-9]* devices (bsc#1010938). # + # @param [String] kind of tty ("tty", "ttyS") # @return [String] ready to be passed to the loadkeys command - def loadkeys_devices - tty_dev_names = Dir["/dev/tty*"].grep_v(/ttyAMA/) + def loadkeys_devices (kind) + tty_dev_names = Dir["/dev/#{kind}[0-9]*"] tty_dev_names.map { |d| "-C #{d.shellescape}" }.join(" ") end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.1.11/keyboard/test/keyboard_test.rb new/yast2-country-4.1.12/keyboard/test/keyboard_test.rb --- old/yast2-country-4.1.11/keyboard/test/keyboard_test.rb 2019-03-19 11:32:01.000000000 +0100 +++ new/yast2-country-4.1.12/keyboard/test/keyboard_test.rb 2019-05-09 15:31:20.000000000 +0200 @@ -129,6 +129,15 @@ let(:stage) { "normal" } let(:chroot) { "spanish" } + before do + allow(Dir).to receive(:[]).with("/dev/tty[0-9]*").and_return( + ["/dev/tty1"] + ) + allow(Dir).to receive(:[]).with("/dev/ttyS[0-9]*").and_return( + ["/dev/ttyS0"] + ) + end + it "correctly sets all layout variables" do expect(SCR).to execute_bash(/loadkeys -C \/dev\/tty.* ruwin_alt-UTF-8\.map\.gz/) @@ -142,7 +151,7 @@ stub_presence_of "/usr/sbin/xkbctrl" allow(XVersion).to receive(:binPath).and_return "/usr/bin" - expect(SCR).to execute_bash(/loadkeys -C \/dev\/tty.* tr\.map\.gz/) + expect(SCR).to execute_bash(/loadkeys -C \/dev\/tty.* tr\.map\.gz/).twice # Called twice, for SetConsole and SetX11 expect(SCR).to execute_bash(/xkbctrl tr\.map\.gz/).twice do |p, cmd| dump_xkbctrl(:turkish, cmd.split("> ")[1]) @@ -161,16 +170,12 @@ end context "if there are AMBA devices in the system" do - before do - allow(Dir).to receive(:[]).and_return( - ["/dev/tty1", "/dev/ttyAMA0", "/dev/ttyS0"] - ) - end it "does not try to set the keymap for /dev/ttyAMA devices" do expect(SCR).to receive(:Execute) do |path, command| expect(path).to eq path(".target.bash") - expect(command).to include "loadkeys -C /dev/tty1 -C /dev/ttyS0 ruwin_alt-UTF-8" + expect(command).to include "loadkeys -C" + expect(command).to include "ruwin_alt-UTF-8" expect(command).to_not include "/dev/ttyAMA0" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.1.11/package/yast2-country.changes new/yast2-country-4.1.12/package/yast2-country.changes --- old/yast2-country-4.1.11/package/yast2-country.changes 2019-03-19 11:32:01.000000000 +0100 +++ new/yast2-country-4.1.12/package/yast2-country.changes 2019-05-09 15:31:20.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu May 9 13:42:57 CEST 2019 - [email protected] + +- Fix: Keyboard language cannot be changed in textmode + (bsc#1120957). +- 4.1.12 + +------------------------------------------------------------------- Tue Mar 19 07:06:45 UTC 2019 - Dominique Leuenberger <[email protected]> - Fix command line parameter to systemd-firstboot (--root instead diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.1.11/package/yast2-country.spec new/yast2-country-4.1.12/package/yast2-country.spec --- old/yast2-country-4.1.11/package/yast2-country.spec 2019-03-19 11:32:01.000000000 +0100 +++ new/yast2-country-4.1.12/package/yast2-country.spec 2019-05-09 15:31:20.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 4.1.11 +Version: 4.1.12 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build
