Hello community, here is the log from the commit of package yast2-country for openSUSE:Factory checked in at 2017-03-29 13:22:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-country (Old) and /work/SRC/openSUSE:Factory/.yast2-country.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-country" Wed Mar 29 13:22:52 2017 rev:181 rq:482442 version:3.2.11 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-country/yast2-country.changes 2017-03-10 20:39:53.439137092 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-country.new/yast2-country.changes 2017-03-29 13:22:53.502705908 +0200 @@ -1,0 +2,8 @@ +Thu Mar 23 18:45:42 UTC 2017 - [email protected] + +- Fix GetLocaleString to use the given locale instead of + Language.language +- Fix build problems (bsc#1030745) +- 3.2.11 + +------------------------------------------------------------------- Old: ---- yast2-country-3.2.10.tar.bz2 New: ---- yast2-country-3.2.11.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-country.spec ++++++ --- /var/tmp/diff_new_pack.VFgeBp/_old 2017-03-29 13:22:54.758528303 +0200 +++ /var/tmp/diff_new_pack.VFgeBp/_new 2017-03-29 13:22:54.762527738 +0200 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 3.2.10 +Version: 3.2.11 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-country-3.2.10.tar.bz2 -> yast2-country-3.2.11.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-3.2.10/console/Makefile.am new/yast2-country-3.2.11/console/Makefile.am --- old/yast2-country-3.2.10/console/Makefile.am 2017-03-03 12:02:48.752000000 +0100 +++ new/yast2-country-3.2.11/console/Makefile.am 2017-03-24 10:23:53.399701869 +0100 @@ -1,3 +1,3 @@ # # Makefile.am for country/console -SUBDIRS = src +SUBDIRS = src test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-3.2.10/console/test/Makefile.am new/yast2-country-3.2.11/console/test/Makefile.am --- old/yast2-country-3.2.10/console/test/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-country-3.2.11/console/test/Makefile.am 2017-03-24 10:23:53.399701869 +0100 @@ -0,0 +1,12 @@ +# +# Makefile.am for console/test +# + +TESTS = \ + console_test.rb + +TEST_EXTENSIONS = .rb +RB_LOG_COMPILER = rspec +VERBOSE = 1 +EXTRA_DIST = $(TESTS) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-3.2.10/console/test/console_test.rb new/yast2-country-3.2.11/console/test/console_test.rb --- old/yast2-country-3.2.10/console/test/console_test.rb 2017-03-03 12:02:48.756000000 +0100 +++ new/yast2-country-3.2.11/console/test/console_test.rb 2017-03-24 10:23:53.399701869 +0100 @@ -12,7 +12,7 @@ describe "#SelectFont" do let(:braille) { false } let(:full_language) { "es_ES.UTF-8" } - let(:language) { "es" } + let(:language) { "es_ES" } let(:os_release_id) { "sles" } before do @@ -22,12 +22,12 @@ it "sets console fonts for the given language" do expect(Yast::UI).to receive(:SetConsoleFont) - .with("(K", "lat9w-16.psfu", "trivial", "", "es") + .with("(K", "lat9w-16.psfu", "trivial", "", "es_ES") console.SelectFont(language) end it "returns the encoding" do - expect(console.SelectFont(language)).to eq("UTF-8") + expect(console.SelectFont(language)).to eq("ISO-8859-1") end context "when no console font is available" do @@ -37,7 +37,7 @@ end it "returns the encoding" do - expect(console.SelectFont(language)).to eq("UTF-8") + expect(console.SelectFont(language)).to eq("ISO-8859-1") end end @@ -46,7 +46,7 @@ it "sets console fonts for the given language" do expect(Yast::UI).to receive(:SetConsoleFont) - .with("", "eurlatgr.psfu", "none", "", "es") + .with("", "eurlatgr.psfu", "none", "", "es_ES") console.SelectFont(language) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-3.2.10/language/src/modules/Language.rb new/yast2-country-3.2.11/language/src/modules/Language.rb --- old/yast2-country-3.2.10/language/src/modules/Language.rb 2017-03-03 12:02:48.868000000 +0100 +++ new/yast2-country-3.2.11/language/src/modules/Language.rb 2017-03-24 10:23:53.539701869 +0100 @@ -530,12 +530,8 @@ end # full language code - val = @language - if @use_utf8 - val = Ops.add(val, Ops.get_string(language_info, 2, "")) - else - val = Ops.add(val, Ops.get_string(language_info, 3, "")) - end + idx = @use_utf8 ? 2 : 3 + val = lang + (language_info[idx] || "") Builtins.y2milestone("locale %1", val) val diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-3.2.10/language/test/Language_test.rb new/yast2-country-3.2.11/language/test/Language_test.rb --- old/yast2-country-3.2.10/language/test/Language_test.rb 2017-03-03 12:02:48.876000000 +0100 +++ new/yast2-country-3.2.11/language/test/Language_test.rb 2017-03-24 10:23:53.539701869 +0100 @@ -1,4 +1,5 @@ #!/usr/bin/env rspec +# coding: utf-8 require_relative "test_helper" @@ -160,4 +161,35 @@ end end + describe "#GetLocaleString" do + context "when using UTF-8" do + it "returns the full locale" do + expect(subject.GetLocaleString("de_ZU")).to eq("de_ZU.UTF-8") + end + + context "and the language is not found in the database" do + it "returns the full locale" do + expect(subject.GetLocaleString("ma_MA")).to eq("ma_MA.UTF-8") + end + end + end + + context "and the suffix '@' is already include in the given locale" do + it "returns the same locale" do + expect(subject.GetLocaleString("es_ES@euro")).to eq("es_ES@euro") + end + end + + context "when UTF-8 is not being used" do + around do |example| + subject.SetExpertValues("use_utf8" => false) # disable UTF-8 + example.run + subject.SetExpertValues("use_utf8" => true) # restore to the default value + end + + it "returns the full language identifier with no encoding" do + expect(subject.GetLocaleString("ma_MA")).to eq("ma_MA") + end + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-3.2.10/package/yast2-country.changes new/yast2-country-3.2.11/package/yast2-country.changes --- old/yast2-country-3.2.10/package/yast2-country.changes 2017-03-03 12:02:48.880000000 +0100 +++ new/yast2-country-3.2.11/package/yast2-country.changes 2017-03-24 10:23:53.555701869 +0100 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Thu Mar 23 18:45:42 UTC 2017 - [email protected] + +- Fix GetLocaleString to use the given locale instead of + Language.language +- Fix build problems (bsc#1030745) +- 3.2.11 + +------------------------------------------------------------------- Thu Mar 2 12:24:03 UTC 2017 - [email protected] merge CASP changes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-3.2.10/package/yast2-country.spec new/yast2-country-3.2.11/package/yast2-country.spec --- old/yast2-country-3.2.10/package/yast2-country.spec 2017-03-03 12:02:48.880000000 +0100 +++ new/yast2-country-3.2.11/package/yast2-country.spec 2017-03-24 10:23:53.555701869 +0100 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 3.2.10 +Version: 3.2.11 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build
