Hello community, here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2019-03-21 09:52:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old) and /work/SRC/openSUSE:Factory/.yast2-packager.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-packager" Thu Mar 21 09:52:03 2019 rev:369 rq:686475 version:4.1.33 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes 2019-03-10 09:30:13.816252467 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-packager.new.28833/yast2-packager.changes 2019-03-21 09:52:04.790808660 +0100 @@ -1,0 +2,7 @@ +Fri Mar 15 15:51:00 CET 2019 - [email protected] + +- AutoYaST: Disabling local repositories in second stage only. + (bsc#1127818) +- 4.1.33 + +------------------------------------------------------------------- Old: ---- yast2-packager-4.1.32.tar.bz2 New: ---- yast2-packager-4.1.33.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-packager.spec ++++++ --- /var/tmp/diff_new_pack.JlvxtN/_old 2019-03-21 09:52:05.414808491 +0100 +++ /var/tmp/diff_new_pack.JlvxtN/_new 2019-03-21 09:52:05.418808490 +0100 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.1.32 +Version: 4.1.33 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-packager-4.1.32.tar.bz2 -> yast2-packager-4.1.33.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.1.32/package/yast2-packager.changes new/yast2-packager-4.1.33/package/yast2-packager.changes --- old/yast2-packager-4.1.32/package/yast2-packager.changes 2019-03-08 10:07:57.000000000 +0100 +++ new/yast2-packager-4.1.33/package/yast2-packager.changes 2019-03-19 17:23:54.000000000 +0100 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Mar 15 15:51:00 CET 2019 - [email protected] + +- AutoYaST: Disabling local repositories in second stage only. + (bsc#1127818) +- 4.1.33 + +------------------------------------------------------------------- Thu Mar 7 17:08:01 CET 2019 - [email protected] - Bug fix: Changing repo URL has been ignored (bsc#1119564). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.1.32/package/yast2-packager.spec new/yast2-packager-4.1.33/package/yast2-packager.spec --- old/yast2-packager-4.1.32/package/yast2-packager.spec 2019-03-08 10:07:57.000000000 +0100 +++ new/yast2-packager-4.1.33/package/yast2-packager.spec 2019-03-19 17:23:54.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.1.32 +Version: 4.1.33 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.1.32/src/lib/packager/clients/pkg_finish.rb new/yast2-packager-4.1.33/src/lib/packager/clients/pkg_finish.rb --- old/yast2-packager-4.1.32/src/lib/packager/clients/pkg_finish.rb 2019-03-08 10:07:57.000000000 +0100 +++ new/yast2-packager-4.1.33/src/lib/packager/clients/pkg_finish.rb 2019-03-19 17:23:54.000000000 +0100 @@ -48,6 +48,7 @@ Yast.import "Packages" Yast.import "Directory" Yast.import "ProductFeatures" + Yast.import "InstFunctions" end # @see Implements ::Installation::FinishClient#modes @@ -62,6 +63,16 @@ # @see Implements ::Installation::FinishClient#write def write + if Stage.cont + # AutoYaST second stage. We only have to disable local repos. + Pkg.SourceLoad + disable_local_repos + # save all repositories and finish target + Pkg.SourceSaveAll + Pkg.TargetFinish + return nil + end + # Remove (backup) all sources not used during the update # BNC #556469: Backup and remove all the old repositories before any Pkg::SourceSaveAll call backup_all_target_sources if Stage.initial && Mode.update @@ -76,7 +87,8 @@ # if online repositories were not enabled), resolvables should be loaded now. Pkg.SourceLoad remove_auto_added_sources - disable_local_repos + # AutoYaST: disable_local_repos will be called in second install + disable_local_repos unless InstFunctions.second_stage_required? # save all repositories and finish target Pkg.SourceSaveAll diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.1.32/test/pkg_finish_test.rb new/yast2-packager-4.1.33/test/pkg_finish_test.rb --- old/yast2-packager-4.1.32/test/pkg_finish_test.rb 2019-03-08 10:07:57.000000000 +0100 +++ new/yast2-packager-4.1.33/test/pkg_finish_test.rb 2019-03-19 17:23:54.000000000 +0100 @@ -18,6 +18,7 @@ subject(:client) { Yast::PkgFinishClient.new } let(:repositories) { [] } let(:minimalistic_libzypp_config) { false } + let(:second_stage_required) { false } before do allow(Yast::WFM).to receive(:Args).and_return(args) @@ -29,6 +30,7 @@ allow(Yast::ProductFeatures).to receive(:GetBooleanFeature) .with("software", "minimalistic_libzypp_config") .and_return(minimalistic_libzypp_config) + allow(Yast::InstFunctions).to receive(:second_stage_required?).and_return(second_stage_required) end describe "Info" do @@ -121,9 +123,41 @@ allow(remote_repo).to receive(:products).and_return([sles_product]) end - it "disables the local repository" do - expect(local_repo).to receive(:disable!) - client.run + context "second stage will not be called" do + before do + allow(Yast::Stage).to receive(:cont).and_return(false) + end + + it "disables the local repository" do + expect(local_repo).to receive(:disable!) + client.run + end + end + + context "second stage will be called due AutoYaST" do + let(:second_stage_required) { true } + + context "in first installation stage" do + before do + allow(Yast::Stage).to receive(:cont).and_return(false) + end + + it "does not disable the local repository" do + expect(local_repo).not_to receive(:disable!) + client.run + end + end + + context "in second installation stage" do + before do + allow(Yast::Stage).to receive(:cont).and_return(true) + end + + it "disables the local repository" do + expect(local_repo).to receive(:disable!) + client.run + end + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.1.32/test/test_helper.rb new/yast2-packager-4.1.33/test/test_helper.rb --- old/yast2-packager-4.1.32/test/test_helper.rb 2019-03-08 10:07:57.000000000 +0100 +++ new/yast2-packager-4.1.33/test/test_helper.rb 2019-03-19 17:23:54.000000000 +0100 @@ -29,6 +29,7 @@ stub_module("FTP") stub_module("HTTP") stub_module("NtpClient") +stub_module("InstFunctions") if ENV["COVERAGE"] require "simplecov"
