Skip to content

Commit

Permalink
Stop using obsolete XVersion
Browse files Browse the repository at this point in the history
It was useful in 2006 when X.org 6 and X.org 7 had different places for files
  • Loading branch information
mvidner committed Mar 5, 2019
1 parent 2a3fb6e commit 3f533ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions keyboard/src/modules/Keyboard.rb
Expand Up @@ -121,7 +121,6 @@ def main
Yast.import "OSRelease"
Yast.import "ProductFeatures"
Yast.import "Stage"
Yast.import "XVersion"
Yast.import "Report"

# ------------------------------------------------------------------------
Expand Down Expand Up @@ -559,7 +558,7 @@ def SetKeyboard(keyboard)
# do not try to run this with remote X display
if Ops.greater_than(Builtins.size(@Apply), 0) && x11_setup_needed
# Apply cannot be escaped as it is already set of parameters. But it is at least our string and not user provided.
@xkb_cmd = "#{File.join(XVersion.binPath, "setxkbmap")} #{@Apply}"
@xkb_cmd = "/usr/bin/setxkbmap" #{@Apply}"
else
@xkb_cmd = ""
end
Expand Down
4 changes: 0 additions & 4 deletions keyboard/test/keyboard_test.rb
Expand Up @@ -13,7 +13,6 @@ module Yast
import "Path"
import "Encoding"
import "AsciiFile"
import "XVersion"
import "Report"
import "OSRelease"
import "Keyboard"
Expand Down Expand Up @@ -52,7 +51,6 @@ module Yast
describe "#Save" do
before(:each) do
stub_presence_of "/usr/sbin/xkbctrl"
allow(XVersion).to receive(:binPath).and_return "/usr/bin"
# Stub the configuration writing...
stub_scr_write
# ...but allow the dump_xkbctrl helper to use SCR.Write
Expand Down Expand Up @@ -140,7 +138,6 @@ module Yast

it "calls setxkbmap if graphical system is installed" do
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/)
# Called twice, for SetConsole and SetX11
Expand Down Expand Up @@ -184,7 +181,6 @@ module Yast

before(:each) do
stub_presence_of "/usr/sbin/xkbctrl"
allow(XVersion).to receive(:binPath).and_return "/usr/bin"

allow(SCR).to execute_bash(/xkbctrl/) do |p, cmd|
dump_xkbctrl(new_lang, cmd.split("> ")[1])
Expand Down

0 comments on commit 3f533ca

Please sign in to comment.