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 2022-06-18 22:05:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-country (Old) and /work/SRC/openSUSE:Factory/.yast2-country.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-country" Sat Jun 18 22:05:49 2022 rev:232 rq:983457 version:4.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-country/yast2-country.changes 2022-04-14 17:24:15.631178888 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-country.new.1548/yast2-country.changes 2022-06-18 22:05:55.083632941 +0200 @@ -1,0 +2,6 @@ +Fri Jun 17 14:39:10 UTC 2022 - Josef Reidinger <[email protected]> + +- Adapt language module to run properly in chroot (bsc#1199840) +- 4.5.1 + +------------------------------------------------------------------- Old: ---- yast2-country-4.5.0.tar.bz2 New: ---- yast2-country-4.5.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-country.spec ++++++ --- /var/tmp/diff_new_pack.X7Amam/_old 2022-06-18 22:05:55.875634066 +0200 +++ /var/tmp/diff_new_pack.X7Amam/_new 2022-06-18 22:05:55.879634072 +0200 @@ -17,7 +17,7 @@ Name: yast2-country -Version: 4.5.0 +Version: 4.5.1 Release: 0 Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone) License: GPL-2.0-only ++++++ yast2-country-4.5.0.tar.bz2 -> yast2-country-4.5.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.5.0/language/src/modules/Language.rb new/yast2-country-4.5.1/language/src/modules/Language.rb --- old/yast2-country-4.5.0/language/src/modules/Language.rb 2022-04-12 13:33:33.000000000 +0200 +++ new/yast2-country-4.5.1/language/src/modules/Language.rb 2022-06-17 16:53:58.000000000 +0200 @@ -915,18 +915,14 @@ SCR.Write(path(".sysconfig.language.INSTALLED_LANGUAGES"), @languages) SCR.Write(path(".sysconfig.language"), nil) - command = store_locale_command(locale) - - log.info("Making language settings persistent: #{command.join(' ')}") - - Yast::Execute.locally!(command) + run_locale_command(locale) nil rescue Cheetah::ExecutionFailed => e log.error "Language configuration not written: #{e.inspect}" log.error "stderr: #{e.stderr}" # TRANSLATORS: the "%s" is replaced by the executed command - Report.Error(_("Could not save the language setting, the command\n%s\nfailed.") % command.join(' ')) + Report.Error(_("Could not save the language setting, the command\n%s\nfailed.") % e.commands.first.join(' ')) nil end @@ -1430,22 +1426,31 @@ Builtins.getenv("TERM") == "iterm" end - # Returns the command to make language settings persistent + # Runs the command to make language settings persistent # # It is different depending on the stage, since for a not installed system it is needed to use # the `systemd-firsrboot` tool, which does not work in a chroot # # @param locale [String] + # @raises [Cheetah::ExecutionFailed] when command failed to run # - # @return [Array<String>] an array containing the command to be executed - def store_locale_command(locale) + # @return [String] command that is invoked + def run_locale_command(locale) if Stage.initial - # do use --root option, running in chroot does not work - ["/usr/bin/systemd-firstboot", "--root", Installation.destdir, "--locale", locale] + # use --root option locally, running in chroot does not work in insts-sys + command = ["/usr/bin/systemd-firstboot", "--root", Installation.destdir, "--locale", locale] + + log.info("Making language settings persistent: #{command.join(' ')}") + + Yast::Execute.locally!(command) else prepare_locale_settings(locale) - ["/usr/bin/localectl", "set-locale", *localectl_args] + command = ["/usr/bin/localectl", "set-locale", *localectl_args] + + log.info("Making language settings persistent: #{command.join(' ')}") + + Yast::Execute.on_target!(command) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.5.0/language/test/Language_test.rb new/yast2-country-4.5.1/language/test/Language_test.rb --- old/yast2-country-4.5.0/language/test/Language_test.rb 2022-04-12 13:33:33.000000000 +0200 +++ new/yast2-country-4.5.1/language/test/Language_test.rb 2022-06-17 16:53:58.000000000 +0200 @@ -179,6 +179,7 @@ allow(Yast::SCR).to receive(:Write) allow(Yast::Execute).to receive(:locally!) + allow(Yast::Execute).to receive(:on_target!) allow(subject).to receive(:valid_language?).with(language).and_return(true) subject.Set(language) @@ -201,13 +202,13 @@ let(:language) { "zh_HK" } it "sets LC_MESSAGES to zh_TW" do - expect(Yast::Execute).to receive(:locally!).with(array_including(/LC_MESSAGES=zh_TW/)) + expect(Yast::Execute).to receive(:on_target!).with(array_including(/LC_MESSAGES=zh_TW/)) subject.Save end it "passes the localectl settings as separate arguments" do - expect(Yast::Execute).to receive(:locally!) do |args| + expect(Yast::Execute).to receive(:on_target!) do |args| expect(args[0]).to match(/localectl/) expect(args[1]).to eq("set-locale") # the order does not matter @@ -228,7 +229,7 @@ context "and language is not zh_HK" do it "cleans LC_MESSAGES" do - expect(Yast::Execute).to_not receive(:locally!).with(array_including(/LC_MESSAGES=zh_TW/)) + expect(Yast::Execute).to_not receive(:on_target!).with(array_including(/LC_MESSAGES=zh_TW/)) subject.Save end @@ -239,7 +240,7 @@ let(:readonly) { true } it "sets the default language using localectl" do - expect(Yast::Execute).to receive(:locally!) + expect(Yast::Execute).to receive(:on_target!) .with(array_including(/localectl/, "set-locale", /LANG=en_US/)) subject.Save @@ -259,7 +260,7 @@ context "when not using the readonly_language feature" do it "sets the chosen language using localectl" do - expect(Yast::Execute).to receive(:locally!) + expect(Yast::Execute).to receive(:on_target!) .with(array_including(/localectl/, "set-locale", /LANG=#{language}/)) subject.Save @@ -279,11 +280,11 @@ context "when the command fails" do let(:exception) do - Cheetah::ExecutionFailed.new(["localectl"], 1, "stdout", "stderr", "Something went wrong") + Cheetah::ExecutionFailed.new([["localectl"]], 1, "stdout", "stderr", "Something went wrong") end before do - allow(Yast::Execute).to receive(:locally!).and_raise(exception) + allow(Yast::Execute).to receive(:on_target!).and_raise(exception) end it "reports an error" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.5.0/package/yast2-country.changes new/yast2-country-4.5.1/package/yast2-country.changes --- old/yast2-country-4.5.0/package/yast2-country.changes 2022-04-12 13:33:33.000000000 +0200 +++ new/yast2-country-4.5.1/package/yast2-country.changes 2022-06-17 16:53:58.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Jun 17 14:39:10 UTC 2022 - Josef Reidinger <[email protected]> + +- Adapt language module to run properly in chroot (bsc#1199840) +- 4.5.1 + +------------------------------------------------------------------- Wed Apr 06 13:24:58 UTC 2022 - Ladislav Slez??k <[email protected]> - Bump version to 4.5.0 (bsc#1198109) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-country-4.5.0/package/yast2-country.spec new/yast2-country-4.5.1/package/yast2-country.spec --- old/yast2-country-4.5.0/package/yast2-country.spec 2022-04-12 13:33:33.000000000 +0200 +++ new/yast2-country-4.5.1/package/yast2-country.spec 2022-06-17 16:53:58.000000000 +0200 @@ -16,7 +16,7 @@ # Name: yast2-country -Version: 4.5.0 +Version: 4.5.1 Release: 0 Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone) License: GPL-2.0-only
