Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-country for openSUSE:Factory checked in at 2021-08-24 10:54:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-country (Old) and /work/SRC/openSUSE:Factory/.yast2-country.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-country" Tue Aug 24 10:54:11 2021 rev:225 rq:913020 version:4.4.5 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-country/yast2-country.changes 2021-08-05 20:48:24.547911429 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-country.new.1899/yast2-country.changes 2021-08-24 10:54:50.904322890 +0200 @@ -1,0 +2,8 @@ +Wed Aug 18 10:23:48 UTC 2021 - Imobach Gonzalez Sosa <[email protected]> + +- Move the keyboards database to lib/ to make the module compatible + with the self-update mechanism (bsc#1189461). +- 4.4.5 + +------------------------------------------------------------------- +Wed Aug 18 10:23:48 UTC 2021 - Imobach Gonzalez Sosa <[email protected]> Old: ---- yast2-country-4.4.4.tar.bz2 New: ---- yast2-country-4.4.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-country.spec ++++++ --- /var/tmp/diff_new_pack.UvmNL0/_old 2021-08-24 10:54:51.408322222 +0200 +++ /var/tmp/diff_new_pack.UvmNL0/_new 2021-08-24 10:54:51.408322222 +0200 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 4.4.4 +Version: 4.4.5 Release: 0 Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone) License: GPL-2.0-only @@ -124,7 +124,6 @@ %files data %dir %{yast_ydatadir}/languages %{yast_ydatadir}/languages/*.ycp -%{yast_ydatadir}/keyboards.rb %{yast_moduledir}/Language.rb %dir %{yast_libdir}/y2country %{yast_libdir}/y2country/language_dbus.rb ++++++ yast2-country-4.4.4.tar.bz2 -> yast2-country-4.4.5.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.4/keyboard/src/data/keyboards.rb new/yast2-country-4.4.5/keyboard/src/data/keyboards.rb --- old/yast2-country-4.4.4/keyboard/src/data/keyboards.rb 2021-08-05 14:28:41.000000000 +0200 +++ new/yast2-country-4.4.5/keyboard/src/data/keyboards.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,340 +0,0 @@ -# Copyright (c) [2019] SUSE LLC -# -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of version 2 of the GNU General Public License as published -# by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, contact SUSE LLC. -# -# To contact SUSE LLC about this file by physical or electronic mail, you may -# find current contact information at www.suse.com. - -require "yast" -require "yast/i18n" - -# Linux console keyboard layouts -class Keyboards - extend Yast::I18n - - textdomain "country" - - # @return [Array<Hash{String => Object}>] keyboard descriptions - # - # - description [String] translated name of layout - # - alias [String] yast-internal keybord id, to match the "keyboard" key - # in language/src/data/languages/language_*.ycp - # - code [String] keyboard name used by kbd, and - # present in /usr/share/systemd/kbd-model-map - # (test/data/keyboard_test.rb checks this) - # - suggested_for_lang [Array<String>] optional, language codes - # to suggest this layout for - def self.all_keyboards - always_present_keyboards + optional_keyboards - end - - # @see all_keyboards - def self.always_present_keyboards - [ - { "description" => _("English (US)"), - "alias" => "english-us", - "code" => "us", - "suggested_for_lang" => ["ar_eg", "en", "nl_BE"] - }, - { "description" => _("English (UK)"), - "alias" => "english-uk", - "code" => "uk" - }, - { "description" => _("German"), - "alias" => "german", - "code" => "de-latin1-nodeadkeys", - "suggested_for_lang" => ["de"] - }, - { "description" => _("German (with deadkeys)"), - "alias" => "german-deadkey", - "code" => "de-latin1" - }, - { "description" => _("German (Switzerland)"), - "alias" => "german-ch", - "code" => "sg-latin1", - "suggested_for_lang" => ["de_CH"] - }, - { "description" => _("French"), - "alias" => "french", - "code" => "fr-latin1", - "suggested_for_lang" => ["br_FR", "fr", "fr_BE"] - }, - { "description" => _("French (Switzerland)"), - "alias" => "french-ch", - "code" => "fr_CH-latin1", - "suggested_for_lang" => ["fr_CH"] - }, - { "description" => _("French (Canada)"), - "alias" => "french-ca", - "code" => "cf" - }, - { "description" => _("Canadian (Multilingual)"), - "alias" => "cn-latin1", - "code" => "cn-latin1", - "suggested_for_lang" => ["fr_CA"] - }, - { "description" => _("Spanish"), - "alias" => "spanish", - "code" => "es", - "suggested_for_lang" => ["es"] - }, - { "description" => _("Spanish (Latin America)"), - "alias" => "spanish-lat", - "code" => "la-latin1" - }, - { "description" => _("Spanish (CP 850)"), - "alias" => "spanish-lat-cp850", - "code" => "es-cp850" - }, - { "description" => _("Spanish (Asturian variant)"), - "alias" => "spanish-ast", - "code" => "es-ast" - }, - { "description" => _("Italian"), - "alias" => "italian", - "code" => "it", - "suggested_for_lang" => ["it"] - }, - { "description" => _("Persian"), - "alias" => "persian", - "code" => "ir", - "suggested_for_lang" => ["fa_IR"] - }, - { "description" => _("Portuguese"), - "alias" => "portugese", - "code" => "pt-latin1" - }, - { "description" => _("Portuguese (Brazil)"), - "alias" => "portugese-br", - "code" => "br-abnt2" - }, - { "description" => _("Portuguese (Brazil-- US accents)"), - "alias" => "portugese-br-usa", - "code" => "us-acentos" - }, - { "description" => _("Greek"), - "alias" => "greek", - # Left-shift+Alt switches layouts - # Windows (Super) is a Greek-shift - "code" => "gr" - }, - { "description" => _("Dutch"), - "alias" => "dutch", - "code" => "nl" - }, - { "description" => _("Danish"), - "alias" => "danish", - "code" => "dk-latin1" - }, - { "description" => _("Norwegian"), - "alias" => "norwegian", - "code" => "no-latin1", - "suggested_for_lang" => ["no_NO", "nn_NO"] - }, - { "description" => _("Swedish"), - "alias" => "swedish", - "code" => "sv-latin1" - }, - { "description" => _("Finnish"), - "alias" => "finnish", - "code" => "fi" - }, - { "description" => _("Czech"), - "alias" => "czech", - "code" => "cz-us-qwertz" - }, - { "description" => _("Czech (qwerty)"), - "alias" => "czech-qwerty", - "code" => "cz-lat2-us" - }, - { "description" => _("Slovak"), - "alias" => "slovak", - "code" => "sk-qwertz" - }, - { "description" => _("Slovak (qwerty)"), - "alias" => "slovak-qwerty", - "code" => "sk-qwerty" - }, - { "description" => _("Slovene"), - "alias" => "slovene", - "code" => "slovene" - }, - { "description" => _("Hungarian"), - "alias" => "hungarian", - "code" => "hu" - }, - { "description" => _("Polish"), - "alias" => "polish", - "code" => "Pl02" - }, - { "description" => _("Russian"), - "alias" => "russian", - "code" => "ruwin_alt-UTF-8", - "suggested_for_lang" => ["ru", "ru_RU.KOI8-R"] - }, - { "description" => _("Serbian"), - "alias" => "serbian", - "code" => "sr-cy", - "suggested_for_lang" => ["sr_YU"] - }, - { "description" => _("Estonian"), - "alias" => "estonian", - "code" => "et" - }, - { "description" => _("Lithuanian"), - "alias" => "lithuanian", - "code" => "lt.baltic" - }, - { "description" => _("Turkish"), - "alias" => "turkish", - "code" => "trq" - }, - { "description" => _("Croatian"), - "alias" => "croatian", - "code" => "croat" - }, - { "description" => _("Japanese"), - "alias" => "japanese", - "code" => "jp106" - }, - { "description" => _("Belgian"), - "alias" => "belgian", - "code" => "be-latin1", - "suggested_for_lang" => ["be_BY"] - }, - { "description" => _("Dvorak"), - "alias" => "dvorak", - # Beware, Dvorak is completely different from QWERTY; - # see also https://en.wikipedia.org/wiki/Dvorak_keyboard_layout - "code" => "dvorak" - }, - { "description" => _("Icelandic"), - "alias" => "icelandic", - "code" => "is-latin1", - "suggested_for_lang" => ["is_IS"] - }, - { "description" => _("Ukrainian"), - "alias" => "ukrainian", - # AltGr or Right-Ctrl switch layouts - "code" => "ua-utf" - }, - { "description" => _("Khmer"), - "alias" => "khmer", - "code" => "khmer" - }, - { "description" => _("Korean"), - "alias" => "korean", - "code" => "korean" - }, - { "description" => _("Arabic"), - "alias" => "arabic", - "code" => "arabic" - }, - { "description" => _("Tajik"), - "alias" => "tajik", - # AltGr switches layouts - "code" => "tj_alt-UTF8" - }, - { "description" => _("Traditional Chinese"), - "alias" => "taiwanese", - "code" => "tw" - }, - { "description" => _("Simplified Chinese"), - "alias" => "chinese", - "code" => "cn" - }, - { "description" => _("Romanian"), - "alias" => "romanian", - "code" => "ro" - }, - { "description" => _("US International"), - "alias" => "us-int", - "code" => "us-acentos" - } - ] - end - - # Some keyboards are present in new openSUSE releases but not in older SLE - # @see all_keyboards - def self.optional_keyboards - # memoize this - return @optional_keyboards unless @optional_keyboards.nil? - - @optional_keyboards = [] - - # The afnor layout was added to xkeyboard-config in 2019-06 - # but SLE15-SP4 only has 2.23 released in 2018 - afnor_test = lambda do - kmm = File.read("/usr/share/systemd/kbd-model-map") rescue "" - kmm.match?("^fr-afnor") - end - afnor = { - "description" => _("French (AFNOR)"), - "alias" => "french-afnor", - "code" => "fr-afnor", - "suggested_for_lang" => ["br_FR", "fr", "fr_BE"] - } - @optional_keyboards.push(afnor) if afnor_test.call - - @optional_keyboards - end - - # Evaluate the proposed keyboard for a given language - # - # @param [String] language e.g. "de_CH" - # - # @return [String] keyboard alias e.g. "german-ch" or nil - # - def self.suggested_keyboard(language) - keyboard = all_keyboards.detect do |kb| - kb["suggested_for_lang"] && - kb["suggested_for_lang"].include?(language) - end - keyboard ? keyboard["alias"] : nil - end - - # Evaluate alias name for a given keymap - # - # @param [String] keymap e.g. "de-latin1-nodeadkeys" - # - # @return [String] keyboard alias e.g. "german" or nil - # - def self.alias(keymap) - keyboard = all_keyboards.detect {|kb| kb["code"] == keymap } - keyboard ? keyboard["alias"] : nil - end - - # Evaluate description for an given alias name - # - # @param [String] alias e.g. "english-us" - # - # @return [String] translated description or nil - # - def self.description(key_alias) - keyboard = all_keyboards.detect {|kb| kb["alias"] == key_alias } - keyboard ? keyboard["description"] : nil - end - - # Evaluate kemap for an given alias name - # - # @param [String] alias e.g. "english-us" - # - # @return [String] keymap (e.g. "de_DE") or nil - # - def self.code(key_alias) - keyboard = all_keyboards.detect {|kb| kb["alias"] == key_alias } - keyboard ? keyboard["code"] : nil - end -end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.4/keyboard/src/lib/y2keyboard/clients/keyboard.rb new/yast2-country-4.4.5/keyboard/src/lib/y2keyboard/clients/keyboard.rb --- old/yast2-country-4.4.4/keyboard/src/lib/y2keyboard/clients/keyboard.rb 2021-08-05 14:28:41.000000000 +0200 +++ new/yast2-country-4.4.5/keyboard/src/lib/y2keyboard/clients/keyboard.rb 2021-08-19 10:02:29.000000000 +0200 @@ -4,7 +4,7 @@ require_relative "../strategies/systemd_strategy" require_relative "../strategies/yast_proposal_strategy" require_relative "../keyboard_layout" -require_relative "../../../data/keyboards" +require "y2keyboard/keyboards" module Yast class KeyboardClient < Client diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.4/keyboard/src/lib/y2keyboard/keyboards.rb new/yast2-country-4.4.5/keyboard/src/lib/y2keyboard/keyboards.rb --- old/yast2-country-4.4.4/keyboard/src/lib/y2keyboard/keyboards.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-country-4.4.5/keyboard/src/lib/y2keyboard/keyboards.rb 2021-08-19 10:02:29.000000000 +0200 @@ -0,0 +1,340 @@ +# Copyright (c) [2019] SUSE LLC +# +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, contact SUSE LLC. +# +# To contact SUSE LLC about this file by physical or electronic mail, you may +# find current contact information at www.suse.com. + +require "yast" +require "yast/i18n" + +# Linux console keyboard layouts +class Keyboards + extend Yast::I18n + + textdomain "country" + + # @return [Array<Hash{String => Object}>] keyboard descriptions + # + # - description [String] translated name of layout + # - alias [String] yast-internal keybord id, to match the "keyboard" key + # in language/src/data/languages/language_*.ycp + # - code [String] keyboard name used by kbd, and + # present in /usr/share/systemd/kbd-model-map + # (test/data/keyboard_test.rb checks this) + # - suggested_for_lang [Array<String>] optional, language codes + # to suggest this layout for + def self.all_keyboards + always_present_keyboards + optional_keyboards + end + + # @see all_keyboards + def self.always_present_keyboards + [ + { "description" => _("English (US)"), + "alias" => "english-us", + "code" => "us", + "suggested_for_lang" => ["ar_eg", "en", "nl_BE"] + }, + { "description" => _("English (UK)"), + "alias" => "english-uk", + "code" => "uk" + }, + { "description" => _("German"), + "alias" => "german", + "code" => "de-latin1-nodeadkeys", + "suggested_for_lang" => ["de"] + }, + { "description" => _("German (with deadkeys)"), + "alias" => "german-deadkey", + "code" => "de-latin1" + }, + { "description" => _("German (Switzerland)"), + "alias" => "german-ch", + "code" => "sg-latin1", + "suggested_for_lang" => ["de_CH"] + }, + { "description" => _("French"), + "alias" => "french", + "code" => "fr-latin1", + "suggested_for_lang" => ["br_FR", "fr", "fr_BE"] + }, + { "description" => _("French (Switzerland)"), + "alias" => "french-ch", + "code" => "fr_CH-latin1", + "suggested_for_lang" => ["fr_CH"] + }, + { "description" => _("French (Canada)"), + "alias" => "french-ca", + "code" => "cf" + }, + { "description" => _("Canadian (Multilingual)"), + "alias" => "cn-latin1", + "code" => "cn-latin1", + "suggested_for_lang" => ["fr_CA"] + }, + { "description" => _("Spanish"), + "alias" => "spanish", + "code" => "es", + "suggested_for_lang" => ["es"] + }, + { "description" => _("Spanish (Latin America)"), + "alias" => "spanish-lat", + "code" => "la-latin1" + }, + { "description" => _("Spanish (CP 850)"), + "alias" => "spanish-lat-cp850", + "code" => "es-cp850" + }, + { "description" => _("Spanish (Asturian variant)"), + "alias" => "spanish-ast", + "code" => "es-ast" + }, + { "description" => _("Italian"), + "alias" => "italian", + "code" => "it", + "suggested_for_lang" => ["it"] + }, + { "description" => _("Persian"), + "alias" => "persian", + "code" => "ir", + "suggested_for_lang" => ["fa_IR"] + }, + { "description" => _("Portuguese"), + "alias" => "portugese", + "code" => "pt-latin1" + }, + { "description" => _("Portuguese (Brazil)"), + "alias" => "portugese-br", + "code" => "br-abnt2" + }, + { "description" => _("Portuguese (Brazil-- US accents)"), + "alias" => "portugese-br-usa", + "code" => "us-acentos" + }, + { "description" => _("Greek"), + "alias" => "greek", + # Left-shift+Alt switches layouts + # Windows (Super) is a Greek-shift + "code" => "gr" + }, + { "description" => _("Dutch"), + "alias" => "dutch", + "code" => "nl" + }, + { "description" => _("Danish"), + "alias" => "danish", + "code" => "dk-latin1" + }, + { "description" => _("Norwegian"), + "alias" => "norwegian", + "code" => "no-latin1", + "suggested_for_lang" => ["no_NO", "nn_NO"] + }, + { "description" => _("Swedish"), + "alias" => "swedish", + "code" => "sv-latin1" + }, + { "description" => _("Finnish"), + "alias" => "finnish", + "code" => "fi" + }, + { "description" => _("Czech"), + "alias" => "czech", + "code" => "cz-us-qwertz" + }, + { "description" => _("Czech (qwerty)"), + "alias" => "czech-qwerty", + "code" => "cz-lat2-us" + }, + { "description" => _("Slovak"), + "alias" => "slovak", + "code" => "sk-qwertz" + }, + { "description" => _("Slovak (qwerty)"), + "alias" => "slovak-qwerty", + "code" => "sk-qwerty" + }, + { "description" => _("Slovene"), + "alias" => "slovene", + "code" => "slovene" + }, + { "description" => _("Hungarian"), + "alias" => "hungarian", + "code" => "hu" + }, + { "description" => _("Polish"), + "alias" => "polish", + "code" => "Pl02" + }, + { "description" => _("Russian"), + "alias" => "russian", + "code" => "ruwin_alt-UTF-8", + "suggested_for_lang" => ["ru", "ru_RU.KOI8-R"] + }, + { "description" => _("Serbian"), + "alias" => "serbian", + "code" => "sr-cy", + "suggested_for_lang" => ["sr_YU"] + }, + { "description" => _("Estonian"), + "alias" => "estonian", + "code" => "et" + }, + { "description" => _("Lithuanian"), + "alias" => "lithuanian", + "code" => "lt.baltic" + }, + { "description" => _("Turkish"), + "alias" => "turkish", + "code" => "trq" + }, + { "description" => _("Croatian"), + "alias" => "croatian", + "code" => "croat" + }, + { "description" => _("Japanese"), + "alias" => "japanese", + "code" => "jp106" + }, + { "description" => _("Belgian"), + "alias" => "belgian", + "code" => "be-latin1", + "suggested_for_lang" => ["be_BY"] + }, + { "description" => _("Dvorak"), + "alias" => "dvorak", + # Beware, Dvorak is completely different from QWERTY; + # see also https://en.wikipedia.org/wiki/Dvorak_keyboard_layout + "code" => "dvorak" + }, + { "description" => _("Icelandic"), + "alias" => "icelandic", + "code" => "is-latin1", + "suggested_for_lang" => ["is_IS"] + }, + { "description" => _("Ukrainian"), + "alias" => "ukrainian", + # AltGr or Right-Ctrl switch layouts + "code" => "ua-utf" + }, + { "description" => _("Khmer"), + "alias" => "khmer", + "code" => "khmer" + }, + { "description" => _("Korean"), + "alias" => "korean", + "code" => "korean" + }, + { "description" => _("Arabic"), + "alias" => "arabic", + "code" => "arabic" + }, + { "description" => _("Tajik"), + "alias" => "tajik", + # AltGr switches layouts + "code" => "tj_alt-UTF8" + }, + { "description" => _("Traditional Chinese"), + "alias" => "taiwanese", + "code" => "tw" + }, + { "description" => _("Simplified Chinese"), + "alias" => "chinese", + "code" => "cn" + }, + { "description" => _("Romanian"), + "alias" => "romanian", + "code" => "ro" + }, + { "description" => _("US International"), + "alias" => "us-int", + "code" => "us-acentos" + } + ] + end + + # Some keyboards are present in new openSUSE releases but not in older SLE + # @see all_keyboards + def self.optional_keyboards + # memoize this + return @optional_keyboards unless @optional_keyboards.nil? + + @optional_keyboards = [] + + # The afnor layout was added to xkeyboard-config in 2019-06 + # but SLE15-SP4 only has 2.23 released in 2018 + afnor_test = lambda do + kmm = File.read("/usr/share/systemd/kbd-model-map") rescue "" + kmm.match?("^fr-afnor") + end + afnor = { + "description" => _("French (AFNOR)"), + "alias" => "french-afnor", + "code" => "fr-afnor", + "suggested_for_lang" => ["br_FR", "fr", "fr_BE"] + } + @optional_keyboards.push(afnor) if afnor_test.call + + @optional_keyboards + end + + # Evaluate the proposed keyboard for a given language + # + # @param [String] language e.g. "de_CH" + # + # @return [String] keyboard alias e.g. "german-ch" or nil + # + def self.suggested_keyboard(language) + keyboard = all_keyboards.detect do |kb| + kb["suggested_for_lang"] && + kb["suggested_for_lang"].include?(language) + end + keyboard ? keyboard["alias"] : nil + end + + # Evaluate alias name for a given keymap + # + # @param [String] keymap e.g. "de-latin1-nodeadkeys" + # + # @return [String] keyboard alias e.g. "german" or nil + # + def self.alias(keymap) + keyboard = all_keyboards.detect {|kb| kb["code"] == keymap } + keyboard ? keyboard["alias"] : nil + end + + # Evaluate description for an given alias name + # + # @param [String] alias e.g. "english-us" + # + # @return [String] translated description or nil + # + def self.description(key_alias) + keyboard = all_keyboards.detect {|kb| kb["alias"] == key_alias } + keyboard ? keyboard["description"] : nil + end + + # Evaluate kemap for an given alias name + # + # @param [String] alias e.g. "english-us" + # + # @return [String] keymap (e.g. "de_DE") or nil + # + def self.code(key_alias) + keyboard = all_keyboards.detect {|kb| kb["alias"] == key_alias } + keyboard ? keyboard["code"] : nil + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.4/keyboard/src/modules/Keyboard.rb new/yast2-country-4.4.5/keyboard/src/modules/Keyboard.rb --- old/yast2-country-4.4.4/keyboard/src/modules/Keyboard.rb 2021-08-05 14:28:41.000000000 +0200 +++ new/yast2-country-4.4.5/keyboard/src/modules/Keyboard.rb 2021-08-19 10:02:29.000000000 +0200 @@ -33,7 +33,7 @@ require "shellwords" require "y2keyboard/strategies/kb_strategy" require "y2keyboard/strategies/systemd_strategy" -require_relative "../data/keyboards" +require "y2keyboard/keyboards" module Yast class KeyboardClass < Module diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.4/keyboard/test/data/keyboard_test.rb new/yast2-country-4.4.5/keyboard/test/data/keyboard_test.rb --- old/yast2-country-4.4.4/keyboard/test/data/keyboard_test.rb 2021-08-05 14:28:41.000000000 +0200 +++ new/yast2-country-4.4.5/keyboard/test/data/keyboard_test.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -#!/usr/bin/env rspec -# coding: utf-8 - -require_relative "../test_helper" -require_relative "../../src/data/keyboards" - -describe Keyboards do - describe ".all_keyboards" do - it "returns list with all code valid" do - # read valid codes from systemd as xkbctrl read it from there - valid_codes = File.readlines("/usr/share/systemd/kbd-model-map") - valid_codes.map! { |l| l.strip.sub(/^(\S+)\s+.*$/, "\\1") } - Keyboards.all_keyboards.each do |kb_map| - code = kb_map["code"] - expect(valid_codes).to include(code) - end - end - end -end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.4/keyboard/test/keyboard_spec.rb new/yast2-country-4.4.5/keyboard/test/keyboard_spec.rb --- old/yast2-country-4.4.4/keyboard/test/keyboard_spec.rb 2021-08-05 14:28:41.000000000 +0200 +++ new/yast2-country-4.4.5/keyboard/test/keyboard_spec.rb 2021-08-19 10:02:29.000000000 +0200 @@ -2,7 +2,7 @@ # coding: utf-8 require_relative "test_helper" -require_relative "../src/data/keyboards" +require "y2keyboard/keyboards" Yast.import "Keyboard" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.4/keyboard/test/keyboards_spec.rb new/yast2-country-4.4.5/keyboard/test/keyboards_spec.rb --- old/yast2-country-4.4.4/keyboard/test/keyboards_spec.rb 2021-08-05 14:28:41.000000000 +0200 +++ new/yast2-country-4.4.5/keyboard/test/keyboards_spec.rb 2021-08-19 10:02:29.000000000 +0200 @@ -2,12 +2,12 @@ # coding: utf-8 require_relative "test_helper" -require_relative "../src/data/keyboards" +require "y2keyboard/keyboards" describe "Keyboards" do subject { Keyboards } - describe "#all_keyboards" do + describe ".all_keyboards" do it "returns map of all available keyboard descriptions" do ret = subject.all_keyboards expect(ret.first.key?("description")).to eq(true) @@ -17,9 +17,19 @@ expect(ret.first["suggested_for_lang"].class == Array).to eq(true) end end + + it "returns list with all valid models from systemd" do + # read valid codes from systemd as xkbctrl read it from there + valid_codes = File.readlines("/usr/share/systemd/kbd-model-map") + valid_codes.map! { |l| l.strip.sub(/^(\S+)\s+.*$/, "\\1") } + Keyboards.all_keyboards.each do |kb_map| + code = kb_map["code"] + expect(valid_codes).to include(code) + end + end end - describe "#suggested_keyboard" do + describe ".suggested_keyboard" do context "given language found" do it "returns the proposed keyboard for a given language" do expect(subject.suggested_keyboard("de_CH")).to eq("german-ch") @@ -33,7 +43,7 @@ end end - describe "#alias" do + describe ".alias" do context "given keymap found" do it "evaluates alias name for a given keymap" do expect(subject.alias("de-latin1-nodeadkeys")).to eq("german") @@ -47,7 +57,7 @@ end end - describe "#description" do + describe ".description" do context "given keyboard alias found" do it "evaluates description for a given keyboard" do expect(subject.description("english-us")).not_to be_empty @@ -61,7 +71,7 @@ end end - describe "#code" do + describe ".code" do context "given keyboard alias found" do it "evaluates keymap for a given keyboard" do expect(subject.code("english-us")).to eq("us") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.4/package/yast2-country.changes new/yast2-country-4.4.5/package/yast2-country.changes --- old/yast2-country-4.4.4/package/yast2-country.changes 2021-08-05 14:28:41.000000000 +0200 +++ new/yast2-country-4.4.5/package/yast2-country.changes 2021-08-19 10:02:29.000000000 +0200 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Wed Aug 18 10:23:48 UTC 2021 - Imobach Gonzalez Sosa <[email protected]> + +- Move the keyboards database to lib/ to make the module compatible + with the self-update mechanism (bsc#1189461). +- 4.4.5 + +------------------------------------------------------------------- +Wed Aug 18 10:23:48 UTC 2021 - Imobach Gonzalez Sosa <[email protected]> Thu Aug 5 10:21:22 UTC 2021 - Martin Vidner <[email protected]> - Offer the fr-afnor keyboard only if it is defined (bsc#1188867) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.4.4/package/yast2-country.spec new/yast2-country-4.4.5/package/yast2-country.spec --- old/yast2-country-4.4.4/package/yast2-country.spec 2021-08-05 14:28:41.000000000 +0200 +++ new/yast2-country-4.4.5/package/yast2-country.spec 2021-08-19 10:02:29.000000000 +0200 @@ -16,7 +16,7 @@ # Name: yast2-country -Version: 4.4.4 +Version: 4.4.5 Release: 0 Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone) License: GPL-2.0-only @@ -123,7 +123,6 @@ %files data %dir %{yast_ydatadir}/languages %{yast_ydatadir}/languages/*.ycp -%{yast_ydatadir}/keyboards.rb %{yast_moduledir}/Language.rb %dir %{yast_libdir}/y2country %{yast_libdir}/y2country/language_dbus.rb
