From 8e816c4ade1656ba96a2198321ae8fea17f6e7c6 Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Thu, 8 Oct 2020 18:49:14 +0200 Subject: [PATCH 01/50] Fix random jumps when moving cursor in TUI repository table (bsc#1177145) In ncurses, ChangeWidget(:table, :CurrentItem, ...) will be wrong for sorted tables (which is the default now). It is related to the ChangeWidget(:table, Cell(.., ..), ...) bug, bsc#1165388 This is a workaround: removing the unnecessary ChangeWidget. --- src/lib/packager/clients/repositories.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/packager/clients/repositories.rb b/src/lib/packager/clients/repositories.rb index f289f798f..0035b12a7 100644 --- a/src/lib/packager/clients/repositories.rb +++ b/src/lib/packager/clients/repositories.rb @@ -1039,10 +1039,8 @@ def SummaryDialog exit = false begin - if !current.nil? && Ops.greater_or_equal(current, 0) - UI.ChangeWidget(Id(:table), :CurrentItem, current) - fillCurrentRepoInfo - end + current = -1 if current.nil? + fillCurrentRepoInfo if current >= 0 current = -1 From d7474f6e03d5aab595dc3db353365c43a46f1a1f Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Thu, 8 Oct 2020 19:02:35 +0200 Subject: [PATCH 02/50] version + changelog --- package/yast2-packager.changes | 6 ++++++ package/yast2-packager.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 4099a6f99..8c2935b65 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Oct 8 17:00:20 UTC 2020 - Martin Vidner + +- Fix random jumps when moving cursor in TUI repository table (bsc#1177145) +- 4.2.66 + ------------------------------------------------------------------- Wed Sep 2 14:49:09 UTC 2020 - Ladislav Slezák diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 7c1c0c965..a9ba09840 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.2.65 +Version: 4.2.66 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From 076d79e919cfca53d0b1f3fe183afaa3a1466cf6 Mon Sep 17 00:00:00 2001 From: Steffen Winterfeldt Date: Tue, 30 Jun 2020 11:02:41 +0200 Subject: [PATCH 03/50] set zypp release version environment var at the correct place (bsc#1172870) --- src/lib/y2packager/clients/inst_productsources.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/y2packager/clients/inst_productsources.rb b/src/lib/y2packager/clients/inst_productsources.rb index e847d0026..13001309c 100644 --- a/src/lib/y2packager/clients/inst_productsources.rb +++ b/src/lib/y2packager/clients/inst_productsources.rb @@ -104,6 +104,14 @@ class InstProductsourcesClient < Client def main textdomain "packager" + # Set release version environment variable for zypp. + # + # Otherwise zypp might use the old version (update) resp. fail to find + # a product version at all (new installation). + # + # cf. bsc#1172870 + ENV[RELEASEVER_ENV] = Product.version + if AddOnProduct.skip_add_ons log.info("Skipping module (as requested before)") return :auto @@ -138,10 +146,6 @@ def main return :auto end - # Set the proper release version for newly added repositories - # we want to use new product and not old - ENV[RELEASEVER_ENV] = Product.version - # (Applicable only in inst-sys) @preselect_recommended = true From 303c8ff84b115d01354e4ba766278d13e68a8fee Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Tue, 1 Dec 2020 16:04:50 +0100 Subject: [PATCH 04/50] changes --- package/yast2-packager.changes | 7 +++++++ package/yast2-packager.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 8c2935b65..9ceb57008 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Dec 1 15:03:41 UTC 2020 - Josef Reidinger + +- set zypp release version environment var at the correct place + (bsc#1172870, bsc#1173712) +- 4.2.67 + ------------------------------------------------------------------- Thu Oct 8 17:00:20 UTC 2020 - Martin Vidner diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index a9ba09840..ab89c2e7d 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.2.66 +Version: 4.2.67 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From 709163c9ad84ad9f60181fd4c61b1bdac258b8c5 Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Fri, 15 Jan 2021 12:32:01 +0100 Subject: [PATCH 05/50] Bring back commit 3344dfcd281e963b37 Commit 3344dfcd281e963b37 contained some code adjustments in the file clients/software_proposal.rb related to the introduction of storage-ng. In parallel, commit 6a6b1764feabec3c10 moved that original file to a new location lib/packager/clients/software_proposal.rb As a consequence, when both branches were merged the changes of the former commit got lost and the file still contained the old code without the storage-ng adjustments. --- src/lib/packager/clients/software_proposal.rb | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/lib/packager/clients/software_proposal.rb b/src/lib/packager/clients/software_proposal.rb index a59e70995..98e920465 100644 --- a/src/lib/packager/clients/software_proposal.rb +++ b/src/lib/packager/clients/software_proposal.rb @@ -18,6 +18,7 @@ # ------------------------------------------------------------------------------ require "installation/proposal_client" +require "y2packager/storage_manager_proxy" module Yast # Software installation proposal @@ -146,22 +147,27 @@ def partitioning_changed? # save information about target change time in module Packages Packages.timestamp = Installation.dirinstall_target_time else - storage_timestamp = Convert.to_integer( - WFM.call("wrapper_storage", ["GetTargetChangeTime"]) - ) - # check the partitioning in installation - if Packages.timestamp != storage_timestamp + if Packages.timestamp != staging_revision # don't set changed if it's the first "change" changed = true if Packages.timestamp.nonzero? end - # save information about target change time in module Packages - Packages.timestamp = storage_timestamp + # save information about devicegraph revision in module Packages + Packages.timestamp = staging_revision end + log.info "partitioning_changed? - #{changed}" changed end + # Current revision of the staging storage devicegraph + # + # @return [Integer] + def staging_revision + @storage_manager ||= Y2Packager::StorageManagerProxy.new + @storage_manager.staging_revision + end + # Adjust package locales # @return [Boolean] has the language changed def adjust_locales From 47296dd994fa87ff024038c606d2fc0c29a31797 Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Fri, 15 Jan 2021 13:09:39 +0100 Subject: [PATCH 06/50] Use newer version of the Github API for CI --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 874f03317..fbc8b38dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Git Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 # just for easier debugging... - name: Inspect Installed Packages @@ -38,7 +38,7 @@ jobs: steps: - name: Git Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Rubocop run: rake check:rubocop @@ -50,7 +50,7 @@ jobs: steps: - name: Git Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Package Build run: yast-ci-ruby -o package @@ -62,7 +62,7 @@ jobs: steps: - name: Git Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Yardoc run: rake check:doc @@ -76,7 +76,7 @@ jobs: steps: - name: Git Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Perl Syntax run: yast-ci-ruby -o perl_syntax From 2c340957e69aa0935081cbfdf4d187213138a03c Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Fri, 15 Jan 2021 13:12:42 +0100 Subject: [PATCH 07/50] Version and changelog --- package/yast2-packager.changes | 7 +++++++ package/yast2-packager.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 891571cb5..0f109b7c6 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jan 15 12:11:32 UTC 2021 - Ancor Gonzalez Sosa + +- Proposal: fixed the logic to detect whether the partitioning has + changed since the previous execution (found by bsc#1180537). +- 4.3.12 + ------------------------------------------------------------------- Thu Nov 26 22:29:43 UTC 2020 - Josef Reidinger diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 9e160b17d..8365ecec7 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.11 +Version: 4.3.12 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From 51afbe7d3afc8d8f41877624f62f372208f0f8e6 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 20 Apr 2020 13:46:53 +0200 Subject: [PATCH 08/50] do not backup logs on running system (bsc#1166174) --- src/clients/inst_kickoff.rb | 87 ++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/src/clients/inst_kickoff.rb b/src/clients/inst_kickoff.rb index 2ebc18e32..8d671d5eb 100644 --- a/src/clients/inst_kickoff.rb +++ b/src/clients/inst_kickoff.rb @@ -167,57 +167,62 @@ def backup_stuff # timestamp date = Builtins.timestring("%Y%m%d", ::Time.now.to_i, false) - Builtins.y2milestone("Creating backup of %1", Directory.logdir) - filename = "" - num = 0 + # do not backup logs on running system (bsc#1166174) + if Installation.destdir != "/" + Builtins.y2milestone("Creating backup of %1", Directory.logdir) - while Ops.less_than(num, 42) - filename = Ops.add( - Ops.add( + filename = "" + num = 0 + + while Ops.less_than(num, 42) + filename = Ops.add( Ops.add( Ops.add( - Ops.add(Installation.update_backup_path, "/YaST2-"), - date + Ops.add( + Ops.add(Installation.update_backup_path, "/YaST2-"), + date + ), + "-" ), - "-" + Builtins.sformat("%1", num) ), - Builtins.sformat("%1", num) - ), - ".tar.gz" - ) - if SCR.Read( - path(".target.size"), - Ops.add(Installation.destdir, filename) - ) == -1 - break + ".tar.gz" + ) + if SCR.Read( + path(".target.size"), + Ops.add(Installation.destdir, filename) + ) == -1 + break + end + + num = Ops.add(num, 1) end - num = Ops.add(num, 1) - end - if SCR.Execute( - path(".target.bash"), - "cd #{Shellwords.escape(Installation.destdir)}; " \ - "/bin/tar --ignore-failed-read -czf .#{Shellwords.escape(filename)} var/log/YaST2" - ).nonzero? - Builtins.y2error( - "backup of %1 to %2 failed", - Directory.logdir, - filename - ) - # an error popup - Popup.Error( - Builtins.sformat( - _("Backup of %1 failed. See %2 for details."), + if SCR.Execute( + path(".target.bash"), + "cd #{Shellwords.escape(Installation.destdir)}; " \ + "/bin/tar --ignore-failed-read -czf .#{Shellwords.escape(filename)} var/log/YaST2" + ).nonzero? + Builtins.y2error( + "backup of %1 to %2 failed", Directory.logdir, - Ops.add(Directory.logdir, "/y2log") + filename ) - ) - else - SCR.Execute( - path(".target.bash"), - "cd #{Installation.destdir.shellescape}; /bin/rm -rf var/log/YaST2/*" - ) + # an error popup + Popup.Error( + Builtins.sformat( + _("Backup of %1 failed. See %2 for details."), + Directory.logdir, + Ops.add(Directory.logdir, "/y2log") + ) + ) + else + SCR.Execute( + path(".target.bash"), + "cd #{Installation.destdir.shellescape}; /bin/rm -rf var/log/YaST2/*" + ) + end end if Installation.update_backup_sysconfig From 6dfd34e021abe8388fcf7cb80b11d179630a768e Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 20 Apr 2020 13:57:55 +0200 Subject: [PATCH 09/50] make rubocop happy --- src/clients/inst_kickoff.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/src/clients/inst_kickoff.rb b/src/clients/inst_kickoff.rb index 8d671d5eb..50ee93c81 100644 --- a/src/clients/inst_kickoff.rb +++ b/src/clients/inst_kickoff.rb @@ -167,7 +167,6 @@ def backup_stuff # timestamp date = Builtins.timestring("%Y%m%d", ::Time.now.to_i, false) - # do not backup logs on running system (bsc#1166174) if Installation.destdir != "/" Builtins.y2milestone("Creating backup of %1", Directory.logdir) From a75d026732670aa998dc876369c3bf6fcb204750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Iv=C3=A1n=20L=C3=B3pez=20Gonz=C3=A1lez?= Date: Wed, 20 Jan 2021 12:59:40 +0000 Subject: [PATCH 10/50] Update version and changelog --- package/yast2-packager.changes | 8 ++++++++ package/yast2-packager.spec | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index f52d4e710..cdc476011 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jan 20 12:56:44 UTC 2021 - José Iván López González + +- Backport of PR#521. +- prevent race condition between log rotation and migration + log backup (bsc#1166174) +- 4.1.52 + ------------------------------------------------------------------- Tue Jul 14 10:41:22 CEST 2020 - aschnell@suse.com diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 279b0d809..d93cb3526 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.1.51 +Version: 4.1.52 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build From 1851bff17fe55547ea2adc52ccd52f62de8dbd55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Iv=C3=A1n=20L=C3=B3pez=20Gonz=C3=A1lez?= Date: Wed, 20 Jan 2021 16:51:27 +0000 Subject: [PATCH 11/50] Revert "Fix random jumps when moving cursor in TUI repository table (bsc#1177145)" This reverts commit 8e816c4ade1656ba96a2198321ae8fea17f6e7c6. --- src/lib/packager/clients/repositories.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/packager/clients/repositories.rb b/src/lib/packager/clients/repositories.rb index 0035b12a7..f289f798f 100644 --- a/src/lib/packager/clients/repositories.rb +++ b/src/lib/packager/clients/repositories.rb @@ -1039,8 +1039,10 @@ def SummaryDialog exit = false begin - current = -1 if current.nil? - fillCurrentRepoInfo if current >= 0 + if !current.nil? && Ops.greater_or_equal(current, 0) + UI.ChangeWidget(Id(:table), :CurrentItem, current) + fillCurrentRepoInfo + end current = -1 From 49edef589506a9bf6335e897723fadff1c39535f Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 12 Feb 2021 21:04:07 +0100 Subject: [PATCH 12/50] fix summary for pattern that is not in any repository --- src/modules/Packages.rb | 2 +- test/packages_test.rb | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/modules/Packages.rb b/src/modules/Packages.rb index 94cb1a7ba..36b23f3f7 100644 --- a/src/modules/Packages.rb +++ b/src/modules/Packages.rb @@ -2540,7 +2540,7 @@ def check_missing_resolvables missing[type] = [] unless missing[type] # use quoted "summary" value for patterns as they usually contain spaces - name = (type == :pattern) ? statuses.first.summary.inspect : item + name = (type == :pattern && !statuses.empty?) ? statuses.first.summary.inspect : item missing[type] << name end end diff --git a/test/packages_test.rb b/test/packages_test.rb index 978635dc9..f9ffd5526 100755 --- a/test/packages_test.rb +++ b/test/packages_test.rb @@ -1856,4 +1856,15 @@ def expect_source_urls(mapping) end end end + + describe "#check_missing_resolvables" do + it "does not crash for non available pattern" do + allow(Yast::PackagesProposal).to receive(:GetAllResolvablesForAllTypes) + .and_return(pattern: ["non-existing"]) + allow(Y2Packager::Resolvable).to receive(:find).with(kind: :pattern, name: "non-existing") + .and_return([]) + + expect(subject.send(:check_missing_resolvables)).to eq(pattern: ["non-existing"]) + end + end end From 14fbd3d62956f74841f024dd49b4ed59f0860a13 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 12 Feb 2021 21:39:44 +0100 Subject: [PATCH 13/50] changes --- package/yast2-packager.changes | 8 ++++++++ package/yast2-packager.spec | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 9ceb57008..3251d0bf6 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Feb 12 20:38:23 UTC 2021 - Josef Reidinger + +- Fix crash when installation proposal require pattern and such + pattern is not available in any repository (found during testing + jsc#SLE-17427) +- 4.2.68 + ------------------------------------------------------------------- Tue Dec 1 15:03:41 UTC 2020 - Josef Reidinger diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index ab89c2e7d..c4825a69a 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.2.67 +Version: 4.2.68 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From 1214d547c423c705a15bb7cce61c23b81e880844 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 15 Feb 2021 20:50:43 +0100 Subject: [PATCH 14/50] fix new report --- test/addon_product_test.rb | 4 ++++ test/lib/clients/inst_productsources_test.rb | 2 ++ test/lib/widgets/product_license_confirmation_test.rb | 3 ++- test/product_license_test.rb | 1 + test/repositories_include_test.rb | 1 + 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/test/addon_product_test.rb b/test/addon_product_test.rb index d01cff215..bb369e1f7 100755 --- a/test/addon_product_test.rb +++ b/test/addon_product_test.rb @@ -302,6 +302,8 @@ expect(Yast::Package).to receive(:Install).with("yast2-registration").and_return(false) expect(Yast::WFM).to_not receive(:CallFunction) .with("inst_scc", ["register_media_addon", repo_id]) + # also error is shown + expect(Yast::Report).to receive(:Error) Yast::AddOnProduct.RegisterAddOnProduct(repo_id) end @@ -470,6 +472,7 @@ allow(subject).to receive(:Integrate) allow(subject).to receive(:AddRepo).with(repo["url"], repo["path"], repo["priority"]) .and_return(repo_id) + allow(Yast::Report).to receive(:Error) end it "adds the repository" do @@ -777,6 +780,7 @@ allow(Yast::FileUtils).to receive(:Exists).and_return(true) allow(Yast::XML).to receive(:XMLToYCPFile).and_raise(Yast::XMLDeserializationError) + allow(Yast::Report).to receive(:Error) end it "return empty array" do diff --git a/test/lib/clients/inst_productsources_test.rb b/test/lib/clients/inst_productsources_test.rb index d88567721..e8b3d2baa 100755 --- a/test/lib/clients/inst_productsources_test.rb +++ b/test/lib/clients/inst_productsources_test.rb @@ -106,6 +106,8 @@ def list_of_repos before do allow(Yast::Pkg).to receive(:RepositoryProbe).and_return("RPM-MD") allow(Yast::Pkg).to receive(:RepositoryAdd).and_return(1) + allow(Yast::Pkg).to receive(:SourceRefreshNow).and_return(true) + allow(Yast::Pkg).to receive(:SourceSetEnabled).and_return(true) end it "probes repo" do diff --git a/test/lib/widgets/product_license_confirmation_test.rb b/test/lib/widgets/product_license_confirmation_test.rb index 601e76f57..fa9d0ce3a 100755 --- a/test/lib/widgets/product_license_confirmation_test.rb +++ b/test/lib/widgets/product_license_confirmation_test.rb @@ -125,7 +125,8 @@ context "and license is still unconfirmed" do let(:license_confirmed?) { false } - it "returns false" do + it "returns false and Report it" do + expect(Yast::Report).to receive(:Message) expect(widget.validate).to eq(false) end end diff --git a/test/product_license_test.rb b/test/product_license_test.rb index 18dd0c1e3..a3ed3849f 100755 --- a/test/product_license_test.rb +++ b/test/product_license_test.rb @@ -22,6 +22,7 @@ before do allow(Yast::Language).to receive(:GetLanguagesMap).and_return({}) allow(Yast::Language).to receive(:supported_language?).and_return(true) + allow(Yast::Report).to receive(:Error) # partial test does not fully mock end it "works" do diff --git a/test/repositories_include_test.rb b/test/repositories_include_test.rb index 0bac96a54..cd327e736 100755 --- a/test/repositories_include_test.rb +++ b/test/repositories_include_test.rb @@ -78,6 +78,7 @@ def main before do # URL expansion returns nil (bsc#1059744) allow(Yast::Pkg).to receive(:ExpandedUrl).with(url).and_return(nil) + allow(Yast::Report).to receive(:Error) end it "returns :again symbol" do From 193ff79542409b6ef76630f8a177328df42ff2ca Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 15 Feb 2021 21:12:41 +0100 Subject: [PATCH 15/50] Changes --- package/yast2-packager.changes | 7 +++++++ package/yast2-packager.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 0f109b7c6..39b03b1bc 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Feb 15 20:07:15 UTC 2021 - Josef Reidinger + +- Adapted unit test to recent changes in Yast::Report (related to + bsc#1179893). +- 4.3.13 + ------------------------------------------------------------------- Fri Jan 15 12:11:32 UTC 2021 - Ancor Gonzalez Sosa diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 8365ecec7..e925e9c81 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.12 +Version: 4.3.13 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From 510274eb05508a7461200a09d1a6368e6ec762bc Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Wed, 17 Feb 2021 23:35:09 +0100 Subject: [PATCH 16/50] better wording --- test/lib/widgets/product_license_confirmation_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lib/widgets/product_license_confirmation_test.rb b/test/lib/widgets/product_license_confirmation_test.rb index fa9d0ce3a..05cec5ffc 100755 --- a/test/lib/widgets/product_license_confirmation_test.rb +++ b/test/lib/widgets/product_license_confirmation_test.rb @@ -125,7 +125,7 @@ context "and license is still unconfirmed" do let(:license_confirmed?) { false } - it "returns false and Report it" do + it "reports the error and returns false" do expect(Yast::Report).to receive(:Message) expect(widget.validate).to eq(false) end From e249159dc383817b2e8339eb1920ea9a2dfb11d2 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 19 Feb 2021 14:14:15 +0100 Subject: [PATCH 17/50] fix showing correct download count in log (bsc#1180278) --- src/modules/PackageSlideShow.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/PackageSlideShow.rb b/src/modules/PackageSlideShow.rb index 4b3db0eac..4734d1230 100644 --- a/src/modules/PackageSlideShow.rb +++ b/src/modules/PackageSlideShow.rb @@ -811,7 +811,7 @@ def DoneProvide(error, _reason, _name) @total_downloaded += @current_provide_size @total_count_downloaded += 1 - log.info "Downloaded #{@total_downloaded}/#{@total_count_to_download} packages" + log.info "Downloaded #{@total_count_downloaded}/#{@total_count_to_download} packages" # move the progress also for downloaded files UpdateTotalProgressValue() From 1bed42373341f7bd886036e1c4d1694d92246116 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 19 Feb 2021 14:23:50 +0100 Subject: [PATCH 18/50] changes --- package/yast2-packager.changes | 6 ++++++ package/yast2-packager.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 3251d0bf6..5ca552b10 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 19 13:21:25 UTC 2021 - Josef Reidinger + +- Show correct number of downloaded packages in log (bsc#1180278) +- 4.2.69 + ------------------------------------------------------------------- Fri Feb 12 20:38:23 UTC 2021 - Josef Reidinger diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index c4825a69a..5f4bd012f 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.2.68 +Version: 4.2.69 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From 7d2de1222b982339989a32a3a224c74d549f3a1b Mon Sep 17 00:00:00 2001 From: Sasi Olin Date: Tue, 2 Mar 2021 06:16:41 +0100 Subject: [PATCH 19/50] Add a drop-in replacement for dnf configuration cfa --- src/lib/packager/cfa/dnf_conf.rb | 36 ++++++++++++++++ src/lib/packager/clients/pkg_finish.rb | 26 ++++++++---- test/data/dnf/dnf.conf | 6 +++ test/data/dnf/dnf.conf.expected | 8 ++++ test/lib/cfa/dnf_conf_test.rb | 58 ++++++++++++++++++++++++++ test/pkg_finish_test.rb | 7 ++++ 6 files changed, 133 insertions(+), 8 deletions(-) create mode 100644 src/lib/packager/cfa/dnf_conf.rb create mode 100644 test/data/dnf/dnf.conf create mode 100644 test/data/dnf/dnf.conf.expected create mode 100755 test/lib/cfa/dnf_conf_test.rb diff --git a/src/lib/packager/cfa/dnf_conf.rb b/src/lib/packager/cfa/dnf_conf.rb new file mode 100644 index 000000000..34c4cdf11 --- /dev/null +++ b/src/lib/packager/cfa/dnf_conf.rb @@ -0,0 +1,36 @@ +require "cfa/base_model" +require "cfa/augeas_parser" +require "cfa/matcher" + +module Yast + module Packager + module CFA + # Represents a dnf configuration file. + class DnfConf < ::CFA::BaseModel + # Configuration parser + PARSER = ::CFA::AugeasParser.new("puppet.lns") + # Path to configuration file + PATH = "/etc/dnf/dnf.conf".freeze + + def initialize(file_handler: nil) + super(PARSER, PATH, file_handler: file_handler) + end + + # Set options to keep a minimalistic package selection + def set_minimalistic! + tree = data["main"] + if !tree + tree = ::CFA::AugeasTree.new + data["main"] = tree + end + generic_set("install_weak_deps", "False", tree) + generic_set("tsflags", "nodocs", tree) + end + + def section(name) + data[name] + end + end + end + end +end diff --git a/src/lib/packager/clients/pkg_finish.rb b/src/lib/packager/clients/pkg_finish.rb index 4d2d68ea7..2c886efe4 100644 --- a/src/lib/packager/clients/pkg_finish.rb +++ b/src/lib/packager/clients/pkg_finish.rb @@ -14,6 +14,7 @@ require "installation/finish_client" require "y2packager/repository" require "packager/cfa/zypp_conf" +require "packager/cfa/dnf_conf" Yast.import "InstURL" @@ -32,6 +33,11 @@ class PkgFinishClient < ::Installation::FinishClient "&& /bin/tar -czf '%s' '%s'".freeze # Format of the timestamp to be used as repositories backup BACKUP_TIMESTAMP_FORMAT = "%Y%m%d-%H%M%S".freeze + # Map the CFAs to package managers + PKG_MAPPING = { + "dnf" => Packager::CFA::DnfConf, + "libzypp" => Packager::CFA::ZyppConf + }.freeze # Constructor def initialize @@ -100,7 +106,7 @@ def write # recommended packages, doc-packages,... # (needed for products like CASP) if ProductFeatures.GetBooleanFeature("software", "minimalistic_libzypp_config") - set_minimalistic_libzypp_conf + set_minimalistic_pkg_conf end # copy list of failed packages to installed system @@ -284,15 +290,19 @@ def sync_target_sources Pkg.TargetInitialize(Installation.destdir) end - # Set libzypp configuration to install the minimal amount of packages + # Set package manager configuration to install the minimal amount of packages # # @see Yast::Packager::CFA::ZyppConf#set_minimalistic! - def set_minimalistic_libzypp_conf - log.info("Setting libzypp configuration as minimalistic") - config = Packager::CFA::ZyppConf.new - config.load - config.set_minimalistic! - config.save + def set_minimalistic_pkg_conf + PKG_MAPPING.each do |pkg, cfa| + next unless File.file?(File.join(Installation.destdir, cfa::PATH)) + + log.info("Setting #{pkg} configuration as minimalistic") + config = cfa.new + config.load + config.set_minimalistic! + config.save + end end end end diff --git a/test/data/dnf/dnf.conf b/test/data/dnf/dnf.conf new file mode 100644 index 000000000..be734b1cf --- /dev/null +++ b/test/data/dnf/dnf.conf @@ -0,0 +1,6 @@ +[main] +gpgcheck=1 +installonly_limit=3 +clean_requirements_on_remove=True +best=False +skip_if_unavailable=True diff --git a/test/data/dnf/dnf.conf.expected b/test/data/dnf/dnf.conf.expected new file mode 100644 index 000000000..e8af7e949 --- /dev/null +++ b/test/data/dnf/dnf.conf.expected @@ -0,0 +1,8 @@ +[main] +gpgcheck=1 +installonly_limit=3 +clean_requirements_on_remove=True +best=False +skip_if_unavailable=True +install_weak_deps=False +tsflags=nodocs diff --git a/test/lib/cfa/dnf_conf_test.rb b/test/lib/cfa/dnf_conf_test.rb new file mode 100755 index 000000000..c62d772e9 --- /dev/null +++ b/test/lib/cfa/dnf_conf_test.rb @@ -0,0 +1,58 @@ +#!/usr/bin/env rspec + +require_relative "../../test_helper" + +require "packager/cfa/dnf_conf" +require "tmpdir" + +describe Yast::Packager::CFA::DnfConf do + DNF_CONF_EXAMPLE = DATA_PATH.join("dnf/dnf.conf").freeze + DNF_CONF_EXPECTED = DATA_PATH.join("dnf/dnf.conf.expected").freeze + + subject(:config) { Yast::Packager::CFA::DnfConf.new } + let(:dnf_conf_path) { DNF_CONF_EXAMPLE } + + before do + stub_const("Yast::Packager::CFA::DnfConf::PATH", dnf_conf_path) + end + + describe "#set_minimalistic!" do + before { config.load } + + it "sets minimalistic options" do + config.set_minimalistic! + main = config.section("main") + expect(main["install_weak_deps"]).to eq("False") + expect(main["tsflags"]).to eq("nodocs") + end + end + + describe "#save" do + let(:tmpdir) { Dir.mktmpdir } + let(:dnf_conf_path) { File.join(tmpdir, "dnf.conf") } + let(:expected_content) { File.read(DATA_PATH.join("dnf/dnf.conf.expected")) } + + before do + FileUtils.cp(DNF_CONF_EXAMPLE, File.join(tmpdir, "dnf.conf")) + config.load + end + + after do + FileUtils.remove_entry tmpdir + end + + it "do nothing if no option is not modified" do + config.save + expect(File.read(dnf_conf_path)).to eq(File.read(DNF_CONF_EXAMPLE)) + end + + it "modifies the file accordingly to given options" do + # FIXME: now expected file include also whitespace changes caused + # by https://github.com/hercules-team/augeas/issues/450 + # modify it when augeas is fixed + config.set_minimalistic! + config.save + expect(File.read(dnf_conf_path)).to eq(File.read(DNF_CONF_EXPECTED)) + end + end +end diff --git a/test/pkg_finish_test.rb b/test/pkg_finish_test.rb index 3864c4f49..fb6ec789d 100755 --- a/test/pkg_finish_test.rb +++ b/test/pkg_finish_test.rb @@ -341,6 +341,13 @@ context "if libzypp's minimalistic configuration is enabled" do let(:minimalistic_libzypp_config) { true } + let(:destdir) { tmpdir } + + before do + conf_file = tmpdir.join(Yast::Packager::CFA::ZyppConf::PATH[1..-1]) + FileUtils.mkdir_p(File.dirname(conf_file)) + FileUtils.touch(conf_file) + end it "sets libzypp configuration to be minimalistic" do expect(zypp_conf).to receive(:set_minimalistic!) From d2342b3e79918e17f8d97bcd01deb99c3be7736f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Fri, 5 Mar 2021 09:36:32 +0100 Subject: [PATCH 20/50] Update test/pkg_finish_test.rb --- test/pkg_finish_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pkg_finish_test.rb b/test/pkg_finish_test.rb index fb6ec789d..1b414bc5d 100755 --- a/test/pkg_finish_test.rb +++ b/test/pkg_finish_test.rb @@ -344,7 +344,7 @@ let(:destdir) { tmpdir } before do - conf_file = tmpdir.join(Yast::Packager::CFA::ZyppConf::PATH[1..-1]) + conf_file = File.join(tmpdir, Yast::Packager::CFA::ZyppConf::PATH) FileUtils.mkdir_p(File.dirname(conf_file)) FileUtils.touch(conf_file) end From 101ba65d27e936eb712a4ebe9a6356f8cba26e24 Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Fri, 5 Mar 2021 11:46:38 +0100 Subject: [PATCH 21/50] Version and changelog --- package/yast2-packager.changes | 7 +++++++ package/yast2-packager.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 60e5ad126..b9a0f097c 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Mar 5 10:41:42 UTC 2021 - Ancor Gonzalez Sosa + +- Support for configuring minimalistic DNF (bsc#1182849) + contributed by Sasi Olin (hel@lcp.world). +- 4.3.15 + Fri Feb 19 14:07:15 UTC 2021 - Josef Reidinger ------------------------------------------------------------------- diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 9beefec43..693b86fcd 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.14 +Version: 4.3.15 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From 60f00988286978c334eadffbc36dd280d8286d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Mon, 8 Mar 2021 15:56:03 +0100 Subject: [PATCH 22/50] Installer console - add repository configuration --- package/yast2-packager.changes | 7 +++ package/yast2-packager.spec | 4 +- .../console/plugins/repositories_button.rb | 53 +++++++++++++++++++ .../console/plugins/repositories_command.rb | 38 +++++++++++++ .../plugins/repositories_button_test.rb | 40 ++++++++++++++ 5 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 src/lib/installation/console/plugins/repositories_button.rb create mode 100644 src/lib/installation/console/plugins/repositories_command.rb create mode 100644 test/lib/installation/plugins/repositories_button_test.rb diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index b9a0f097c..b6c34b84b 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Mar 8 14:31:30 UTC 2021 - Ladislav Slezák + +- Extend the special installer configuration dialog with + repository options (jsc#PM-1895, jsc#SLE-16263) +- 4.3.16 + ------------------------------------------------------------------- Fri Mar 5 10:41:42 UTC 2021 - Ancor Gonzalez Sosa diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 693b86fcd..e7b763992 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.15 +Version: 4.3.16 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later @@ -116,8 +116,8 @@ This package contains the libraries and modules for software management. %{yast_yncludedir}/packager/* %{yast_libdir}/language_tag.rb %{yast_libdir}/packager/* -%{yast_libdir}/packager/cfa/* %{yast_libdir}/y2packager/* +%{yast_libdir}/installation/* %{yast_clientdir}/*.rb %{yast_moduledir}/* %{yast_desktopdir}/*.desktop diff --git a/src/lib/installation/console/plugins/repositories_button.rb b/src/lib/installation/console/plugins/repositories_button.rb new file mode 100644 index 000000000..c9e5b42b7 --- /dev/null +++ b/src/lib/installation/console/plugins/repositories_button.rb @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) 2021 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. +# +# ------------------------------------------------------------------------------ + +require "yast" + +require "cwm" +require "installation/console/menu_plugin" + +module Installation + module Console + module Plugins + # define a CWM widget for starting repository configuration + class RepositoriesButton < CWM::PushButton + def initialize + textdomain "packager" + end + + def label + # TRANSLATORS: a button label, it starts the repository configuration + _("Configure Software Repositories...") + end + + def help + # TRANSLATORS: help text + _("

If you need to use an additional repository for installing packages " \ + "then use the Configure Software Repositories button.

") + end + + def handle + Yast::WFM.call("repositories") + nil + end + end + + # define a console plugin + class RepositoriesButtonPlugin < MenuPlugin + def widget + RepositoriesButton.new + end + end + end + end +end diff --git a/src/lib/installation/console/plugins/repositories_command.rb b/src/lib/installation/console/plugins/repositories_command.rb new file mode 100644 index 000000000..b4cab1fa8 --- /dev/null +++ b/src/lib/installation/console/plugins/repositories_command.rb @@ -0,0 +1,38 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) 2021 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. +# +# ------------------------------------------------------------------------------ + +require "pp" +require "yast" + +module Installation + module Console + # define the "repositories" command in the expert console + class Commands + def repositories + Yast.import "Pkg" + + repos = Yast::Pkg.SourceGetCurrent(false).map do |repo| + Yast::Pkg.SourceGeneralData(repo) + end + + pp repos + end + + private + + def repositories_description + "Dump the details of the currently defined software repositories" + end + end + end +end diff --git a/test/lib/installation/plugins/repositories_button_test.rb b/test/lib/installation/plugins/repositories_button_test.rb new file mode 100644 index 000000000..d9309c238 --- /dev/null +++ b/test/lib/installation/plugins/repositories_button_test.rb @@ -0,0 +1,40 @@ +# Copyright (c) [2021] 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_relative "../../../test_helper" +require "installation/console/plugins/repositories_button" + +require "cwm/rspec" + +describe Installation::Console::Plugins::RepositoriesButton do + before do + allow(Yast::WFM).to receive(:call) + end + + include_examples "CWM::PushButton" +end + +describe Installation::Console::Plugins::RepositoriesButtonPlugin do + context "#widget" do + it "returns a CWM widget" do + w = subject.widget + expect(w).to be_a(CWM::AbstractWidget) + end + end +end From 4b732cab5fb0cee28e26af34280be7afb0a63f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Mon, 8 Mar 2021 16:48:55 +0100 Subject: [PATCH 23/50] Fixed a test failure in RPM build --- .../console/plugins/repositories_button.rb | 1 - test/test_helper.rb | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/installation/console/plugins/repositories_button.rb b/src/lib/installation/console/plugins/repositories_button.rb index c9e5b42b7..ae1e0ab23 100644 --- a/src/lib/installation/console/plugins/repositories_button.rb +++ b/src/lib/installation/console/plugins/repositories_button.rb @@ -14,7 +14,6 @@ require "yast" require "cwm" -require "installation/console/menu_plugin" module Installation module Console diff --git a/test/test_helper.rb b/test/test_helper.rb index 3103eb7de..33c9bf923 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -67,3 +67,13 @@ def stub_module(name) ] end end + +# mock empty class to avoid build dependency on yast2-installation +module Installation + module Console + module Plugins + class MenuPlugin + end + end + end +end From 884409e662a579c2b04a2d0713a0141027b744d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 8 Mar 2021 15:33:07 +0000 Subject: [PATCH 24/50] Explain what "online repositories" are --- .../y2packager/clients/inst_productsources.rb | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/lib/y2packager/clients/inst_productsources.rb b/src/lib/y2packager/clients/inst_productsources.rb index 0f1fa312e..90bf65897 100644 --- a/src/lib/y2packager/clients/inst_productsources.rb +++ b/src/lib/y2packager/clients/inst_productsources.rb @@ -1724,15 +1724,19 @@ def ask_activate_online_repos # Ask only once return @@ask_activate_online_repos_result unless @@ask_activate_online_repos_result.nil? - msg << _("The system has an active network connection.\n" \ - "Additional software is available online.") + msg << _("Enabling the online repositories during installation\n" \ + "gives you access to all openSUSE software that did not\n" \ + "fit on the installation media anymore. At the same time,\n" \ + "those repositories might contain updated software\n" \ + "packages, so your new openSUSE system will be right\n" \ + "at the most up-to-date stage.") if low_memory? - msg << _("Since the system has less than %d MiB memory,\n" \ + msg << _("However, since the system has less than %d MiB memory,\n" \ "there is a significant risk of running out of memory,\n" \ - "and the installer may crash or freeze.\n" \ - "\n" \ - "Using the online repositories later in the installed\n" \ + "and the installer may crash or freeze.\n" \ + "\n" \ + "Using the online repositories later in the installed\n" \ "system is recommended.") % LOW_MEMORY_MIB @@posted_low_memory_warning = true end @@ -1740,7 +1744,7 @@ def ask_activate_online_repos msg << _("Activate online repositories now?") @@ask_activate_online_repos_result = Popup.AnyQuestion( - Popup.NoHeadline, + _("Online Repositories"), msg.join("\n\n"), Label.YesButton, Label.NoButton, From c39f6f0d8e7807a513101a5dcbccbafb56469f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 8 Mar 2021 15:45:40 +0000 Subject: [PATCH 25/50] Bump version and update changes file --- package/yast2-packager.changes | 7 +++++++ package/yast2-packager.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index b6c34b84b..c36f79e8c 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Mar 8 15:44:31 UTC 2021 - Imobach Gonzalez Sosa + +- During installation, explain what "online repositories" are + (bsc#1180707). +- 4.3.17 + ------------------------------------------------------------------- Mon Mar 8 14:31:30 UTC 2021 - Ladislav Slezák diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index e7b763992..598410af5 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.16 +Version: 4.3.17 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From cb2e7d4e999bafe5ff9246432e5aa74f09dd3f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 8 Mar 2021 17:39:10 +0000 Subject: [PATCH 26/50] Make online repos warning shorter --- src/lib/y2packager/clients/inst_productsources.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/y2packager/clients/inst_productsources.rb b/src/lib/y2packager/clients/inst_productsources.rb index 90bf65897..50c8ce746 100644 --- a/src/lib/y2packager/clients/inst_productsources.rb +++ b/src/lib/y2packager/clients/inst_productsources.rb @@ -1725,11 +1725,9 @@ def ask_activate_online_repos return @@ask_activate_online_repos_result unless @@ask_activate_online_repos_result.nil? msg << _("Enabling the online repositories during installation\n" \ - "gives you access to all openSUSE software that did not\n" \ - "fit on the installation media anymore. At the same time,\n" \ - "those repositories might contain updated software\n" \ - "packages, so your new openSUSE system will be right\n" \ - "at the most up-to-date stage.") + "gives you access to all software that does not fit on\n" \ + "the installation media anymore. Additionally, those\n" \ + "repositories might contain updated software packages.") if low_memory? msg << _("However, since the system has less than %d MiB memory,\n" \ From fab2034bf73f3ac6f8506f10ddc130a8671359a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Tue, 9 Mar 2021 10:25:08 +0100 Subject: [PATCH 27/50] Added IBM tools product rename to the list (part of bsc#1182837) - 4.3.18 --- package/yast2-packager.changes | 6 ++++++ package/yast2-packager.spec | 2 +- src/modules/AddOnProduct.rb | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index c36f79e8c..7eef94c2e 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 9 09:15:41 UTC 2021 - Ladislav Slezák + +- Added IBM tools product rename to the list (part of bsc#1182837) +- 4.3.18 + ------------------------------------------------------------------- Mon Mar 8 15:44:31 UTC 2021 - Imobach Gonzalez Sosa diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 598410af5..3c63e62ad 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.17 +Version: 4.3.18 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later diff --git a/src/modules/AddOnProduct.rb b/src/modules/AddOnProduct.rb index 6c456cd8c..45e65a0b5 100644 --- a/src/modules/AddOnProduct.rb +++ b/src/modules/AddOnProduct.rb @@ -40,7 +40,9 @@ class AddOnProductClass < Module "sle-module-toolchain" => ["sle-module-development-tools"], "sle-sdk" => ["sle-module-development-tools"], # openSUSE => SLES migration - "openSUSE" => ["SLES"] + "openSUSE" => ["SLES"], + # the IBM tools have been renamed in SLE12->SLE15 upgrade + "ibm-dlpar-utils" => ["ibm-power-tools"] }.freeze # @return [Hash] Product renames added externally through the #add_rename method From 99903f03c551288e6bb522522b547f1fc8e4ee32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 11 Mar 2021 16:11:47 +0100 Subject: [PATCH 28/50] Move the libzypp cache (bsc#1182928) - Improved "memsample" script handling - 4.3.19 --- package/yast2-packager.changes | 11 +++++++++++ package/yast2-packager.spec | 2 +- src/clients/inst_kickoff.rb | 19 ++++++++++--------- src/lib/packager/clients/pkg_finish.rb | 4 ---- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 7eef94c2e..39a326e9c 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Mar 11 15:01:58 UTC 2021 - Ladislav Slezák + +- Move the libzypp cache to the installed system to save some + memory and avoid crashing because out of memory (bsc#1182928) +- Improved "memsample" script handling + - Do not start it again if it is already running + (might happen if YaST is started again after crash) + - Stop it when YaST finishes +- 4.3.19 + ------------------------------------------------------------------- Tue Mar 9 09:15:41 UTC 2021 - Ladislav Slezák diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 3c63e62ad..ae165e30c 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.18 +Version: 4.3.20 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later diff --git a/src/clients/inst_kickoff.rb b/src/clients/inst_kickoff.rb index abf729476..98078dcc5 100644 --- a/src/clients/inst_kickoff.rb +++ b/src/clients/inst_kickoff.rb @@ -4,6 +4,8 @@ module Yast # Do various tasks before starting with installation of rpms. class InstKickoffClient < Client + include Yast::Logger + def main Yast.import "Pkg" textdomain "packager" @@ -44,16 +46,15 @@ def main ) end - # copy the credential files, libzypp loads them from target - zypp_dir = "/etc/zypp" - credentials_d = zypp_dir + "/credentials.d" + # copy the credential files (libzypp loads them from target) + # and the repository cache to the target system + Pkg.SourceCacheCopyTo(Installation.destdir) - if File.exist?(credentials_d) && Installation.destdir != "/" - target_zypp = Installation.destdir + zypp_dir - Builtins.y2milestone("Copying libzypp credentials to #{target_zypp}...") - ::FileUtils.mkdir_p(target_zypp) - ::FileUtils.cp_r(credentials_d, target_zypp) - end + # symlink the cache from inst-sys to save same space (RAM!) + cache_path = Pkg.ZConfig()["repo_cache_path"] || "/var/cache/zypp" + log.info("Zypp cache size: #{`du -h -s #{cache_path.shellescape}`}") + ::FileUtils.rm_rf(cache_path) + File.symlink(File.join(Installation.destdir, cache_path), cache_path) # installation, for instance... if !Mode.update diff --git a/src/lib/packager/clients/pkg_finish.rb b/src/lib/packager/clients/pkg_finish.rb index 2c886efe4..c3a1a58f5 100644 --- a/src/lib/packager/clients/pkg_finish.rb +++ b/src/lib/packager/clients/pkg_finish.rb @@ -98,10 +98,6 @@ def write Pkg.SourceSaveAll Pkg.TargetFinish - # save repository metadata cache to the installed system - # (needs to be done _after_ saving repositories, see bnc#700881) - Pkg.SourceCacheCopyTo(Installation.destdir) - # Patching /etc/zypp/zypp.conf in order not to install # recommended packages, doc-packages,... # (needed for products like CASP) From eff97e9ce99e92aeae16609b937e886c8c1391a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 11 Mar 2021 16:23:12 +0100 Subject: [PATCH 29/50] Fixed unit test --- test/pkg_finish_test.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/pkg_finish_test.rb b/test/pkg_finish_test.rb index 1b414bc5d..690753b78 100755 --- a/test/pkg_finish_test.rb +++ b/test/pkg_finish_test.rb @@ -68,7 +68,6 @@ expect(Yast::Pkg).to receive(:SourceLoad) expect(Yast::Pkg).to receive(:SourceSaveAll) expect(Yast::Pkg).to receive(:TargetFinish) - expect(Yast::Pkg).to receive(:SourceCacheCopyTo).with(destdir) allow(Yast::WFM).to receive(:Execute) expect(client.run).to be_nil end From 5609fbb34b72ed397b9cd075c3f94c80f1df7cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 11 Mar 2021 16:56:39 +0100 Subject: [PATCH 30/50] Code review fixes --- package/yast2-packager.changes | 4 ---- package/yast2-packager.spec | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 39a326e9c..6230c3033 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -3,10 +3,6 @@ Thu Mar 11 15:01:58 UTC 2021 - Ladislav Slezák - Move the libzypp cache to the installed system to save some memory and avoid crashing because out of memory (bsc#1182928) -- Improved "memsample" script handling - - Do not start it again if it is already running - (might happen if YaST is started again after crash) - - Stop it when YaST finishes - 4.3.19 ------------------------------------------------------------------- diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index ae165e30c..46870126b 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.20 +Version: 4.3.19 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From c494b3bb9212420af350b1fd8306691cc49d6501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 18 Mar 2021 17:38:00 +0100 Subject: [PATCH 31/50] Do not create zypp cache symlink in installed system (bsc#1183683) it would create `/var/cache/zypp` -> `/var/cache/zypp` loop --- src/clients/inst_kickoff.rb | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/clients/inst_kickoff.rb b/src/clients/inst_kickoff.rb index 98078dcc5..40b95439b 100644 --- a/src/clients/inst_kickoff.rb +++ b/src/clients/inst_kickoff.rb @@ -46,15 +46,18 @@ def main ) end - # copy the credential files (libzypp loads them from target) - # and the repository cache to the target system - Pkg.SourceCacheCopyTo(Installation.destdir) - - # symlink the cache from inst-sys to save same space (RAM!) - cache_path = Pkg.ZConfig()["repo_cache_path"] || "/var/cache/zypp" - log.info("Zypp cache size: #{`du -h -s #{cache_path.shellescape}`}") - ::FileUtils.rm_rf(cache_path) - File.symlink(File.join(Installation.destdir, cache_path), cache_path) + # copy the zypp cache to the target system (only when running in inst-sys!) + if Stage.initial + # copy the credential files (libzypp loads them from target) + # and the repository cache to the target system + Pkg.SourceCacheCopyTo(Installation.destdir) + + # symlink the cache from inst-sys to save same space (RAM!) + cache_path = Pkg.ZConfig()["repo_cache_path"] || "/var/cache/zypp" + log.info("Zypp cache size: #{`du -h -s #{cache_path.shellescape}`}") + ::FileUtils.rm_rf(cache_path) + File.symlink(File.join(Installation.destdir, cache_path), cache_path) + end # installation, for instance... if !Mode.update From 1c7f06e8b519a20464c296f7f9b82ca4d99615fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 18 Mar 2021 18:15:32 +0100 Subject: [PATCH 32/50] YaST Console: removed "Software Repositories" button (bsc#1183687) Added "configure_repositories" command to the command line interface for experts --- .../plugins/configure_repositories_command.rb | 30 +++++++++++ .../console/plugins/repositories_button.rb | 52 ------------------- .../plugins/repositories_button_test.rb | 40 -------------- 3 files changed, 30 insertions(+), 92 deletions(-) create mode 100644 src/lib/installation/console/plugins/configure_repositories_command.rb delete mode 100644 src/lib/installation/console/plugins/repositories_button.rb delete mode 100644 test/lib/installation/plugins/repositories_button_test.rb diff --git a/src/lib/installation/console/plugins/configure_repositories_command.rb b/src/lib/installation/console/plugins/configure_repositories_command.rb new file mode 100644 index 000000000..1082b660b --- /dev/null +++ b/src/lib/installation/console/plugins/configure_repositories_command.rb @@ -0,0 +1,30 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) 2021 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. +# +# ------------------------------------------------------------------------------ + +module Installation + module Console + # define the "configure_repositories" command in the expert console + class Commands + def configure_repositories + run_yast_module("repositories") + end + + private + + def configure_repositories_description + "Run the repository manager. Be careful when using it,\n" \ + "you might easily break the installer when wrongly used!" + end + end + end +end diff --git a/src/lib/installation/console/plugins/repositories_button.rb b/src/lib/installation/console/plugins/repositories_button.rb deleted file mode 100644 index ae1e0ab23..000000000 --- a/src/lib/installation/console/plugins/repositories_button.rb +++ /dev/null @@ -1,52 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) 2021 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. -# -# ------------------------------------------------------------------------------ - -require "yast" - -require "cwm" - -module Installation - module Console - module Plugins - # define a CWM widget for starting repository configuration - class RepositoriesButton < CWM::PushButton - def initialize - textdomain "packager" - end - - def label - # TRANSLATORS: a button label, it starts the repository configuration - _("Configure Software Repositories...") - end - - def help - # TRANSLATORS: help text - _("

If you need to use an additional repository for installing packages " \ - "then use the Configure Software Repositories button.

") - end - - def handle - Yast::WFM.call("repositories") - nil - end - end - - # define a console plugin - class RepositoriesButtonPlugin < MenuPlugin - def widget - RepositoriesButton.new - end - end - end - end -end diff --git a/test/lib/installation/plugins/repositories_button_test.rb b/test/lib/installation/plugins/repositories_button_test.rb deleted file mode 100644 index d9309c238..000000000 --- a/test/lib/installation/plugins/repositories_button_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) [2021] 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_relative "../../../test_helper" -require "installation/console/plugins/repositories_button" - -require "cwm/rspec" - -describe Installation::Console::Plugins::RepositoriesButton do - before do - allow(Yast::WFM).to receive(:call) - end - - include_examples "CWM::PushButton" -end - -describe Installation::Console::Plugins::RepositoriesButtonPlugin do - context "#widget" do - it "returns a CWM widget" do - w = subject.widget - expect(w).to be_a(CWM::AbstractWidget) - end - end -end From 0b5b634c5aa1b08c5b2d006fabb665456c7dbbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 18 Mar 2021 18:18:23 +0100 Subject: [PATCH 33/50] Changes, 4.3.20 --- package/yast2-packager.changes | 12 ++++++++++++ package/yast2-packager.spec | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 6230c3033..332b47160 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Mar 18 16:33:19 UTC 2021 - Ladislav Slezák + +- Do not create zypp cache symlink when running in installed + system, it would create /var/cache/zypp -> /var/cache/zypp + loop (bsc#1183683) +- Remove the "Software Repositories" button from the YaST console, + users can easily break the installer with it. Added + "configure_repositories" command to the command line interface + for experts (bsc#1183687) +- 4.3.20 + ------------------------------------------------------------------- Thu Mar 11 15:01:58 UTC 2021 - Ladislav Slezák diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 46870126b..ae165e30c 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.19 +Version: 4.3.20 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From ca7e906908cdfab545cbf29acda90a8ab485ea1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Fri, 19 Mar 2021 13:58:09 +0100 Subject: [PATCH 34/50] Code review fix --- src/clients/inst_kickoff.rb | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/clients/inst_kickoff.rb b/src/clients/inst_kickoff.rb index 40b95439b..b362e7825 100644 --- a/src/clients/inst_kickoff.rb +++ b/src/clients/inst_kickoff.rb @@ -46,18 +46,7 @@ def main ) end - # copy the zypp cache to the target system (only when running in inst-sys!) - if Stage.initial - # copy the credential files (libzypp loads them from target) - # and the repository cache to the target system - Pkg.SourceCacheCopyTo(Installation.destdir) - - # symlink the cache from inst-sys to save same space (RAM!) - cache_path = Pkg.ZConfig()["repo_cache_path"] || "/var/cache/zypp" - log.info("Zypp cache size: #{`du -h -s #{cache_path.shellescape}`}") - ::FileUtils.rm_rf(cache_path) - File.symlink(File.join(Installation.destdir, cache_path), cache_path) - end + copy_zypp_cache # installation, for instance... if !Mode.update @@ -142,6 +131,21 @@ def main :next end + # copy the zypp cache to the target system (only when running in inst-sys!) + def copy_zypp_cache + return unless Stage.initial + + # copy the credential files (libzypp loads them from target) + # and the repository cache to the target system + Pkg.SourceCacheCopyTo(Installation.destdir) + + # symlink the cache from inst-sys to save same space (RAM!) + cache_path = Pkg.ZConfig()["repo_cache_path"] || "/var/cache/zypp" + log.info("Zypp cache size: #{`du -h -s #{cache_path.shellescape}`}") + ::FileUtils.rm_rf(cache_path) + File.symlink(File.join(Installation.destdir, cache_path), cache_path) + end + # Handle the backup. def backup_stuff if Installation.update_backup_modified From c836dfa6061e020647b8fb13eac03f9b6c8a1cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Fri, 19 Mar 2021 14:12:15 +0100 Subject: [PATCH 35/50] Comment --- src/clients/inst_kickoff.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/src/clients/inst_kickoff.rb b/src/clients/inst_kickoff.rb index b362e7825..574ca9942 100644 --- a/src/clients/inst_kickoff.rb +++ b/src/clients/inst_kickoff.rb @@ -132,6 +132,7 @@ def main end # copy the zypp cache to the target system (only when running in inst-sys!) + # to save some memory during installation def copy_zypp_cache return unless Stage.initial From 849fa2212390a0fa6f9186117686f2d94cd15ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Wed, 31 Mar 2021 08:51:22 +0200 Subject: [PATCH 36/50] Adapt Rakefile and GitHub Actions for SLE-15-SP3 --- .github/workflows/ci.yml | 10 +++++----- Rakefile | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fbc8b38dc..baba6f36f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: [push, pull_request] jobs: Tests: runs-on: ubuntu-latest - container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + container: registry.opensuse.org/yast/sle-15/sp3/containers/yast-ruby:latest steps: @@ -33,7 +33,7 @@ jobs: Rubocop: runs-on: ubuntu-latest - container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + container: registry.opensuse.org/yast/sle-15/sp3/containers/yast-ruby:latest steps: @@ -45,7 +45,7 @@ jobs: Package: runs-on: ubuntu-latest - container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + container: registry.opensuse.org/yast/sle-15/sp3/containers/yast-ruby:latest steps: @@ -57,7 +57,7 @@ jobs: Yardoc: runs-on: ubuntu-latest - container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + container: registry.opensuse.org/yast/sle-15/sp3/containers/yast-ruby:latest steps: @@ -71,7 +71,7 @@ jobs: # checks into one job avoids that overhead Checks: runs-on: ubuntu-latest - container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + container: registry.opensuse.org/yast/sle-15/sp3/containers/yast-ruby:latest steps: diff --git a/Rakefile b/Rakefile index 547bcd9d8..b5e62237e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,7 @@ require "yast/rake" +Yast::Tasks.submit_to :sle15sp3 + Yast::Tasks.configuration do |conf| # lets ignore license check for now conf.skip_license_check << /.*/ From b5ce3fe6ec3801195b09744110797223ba555b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Tue, 6 Apr 2021 15:50:42 +0200 Subject: [PATCH 37/50] Revert copying the libzypp cache to the target system (bsc#1183711) ... and replacing it by a symlink, it is not safe and it can cause crash (segfault) in some cases - 4.3.21 --- package/yast2-packager.changes | 8 +++++++ package/yast2-packager.spec | 2 +- src/clients/inst_kickoff.rb | 29 +++++++++----------------- src/lib/packager/clients/pkg_finish.rb | 4 ++++ test/pkg_finish_test.rb | 1 + 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 332b47160..0b8721cee 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 6 13:06:27 UTC 2021 - Ladislav Slezák + +- Revert copying the libzypp cache to the target system and + replacing it by a symlink, it is not safe and it can + cause crash (segfault) in some cases (bsc#1183711) +- 4.3.21 + ------------------------------------------------------------------- Thu Mar 18 16:33:19 UTC 2021 - Ladislav Slezák diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index ae165e30c..db78c37ea 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.20 +Version: 4.3.21 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later diff --git a/src/clients/inst_kickoff.rb b/src/clients/inst_kickoff.rb index 574ca9942..abf729476 100644 --- a/src/clients/inst_kickoff.rb +++ b/src/clients/inst_kickoff.rb @@ -4,8 +4,6 @@ module Yast # Do various tasks before starting with installation of rpms. class InstKickoffClient < Client - include Yast::Logger - def main Yast.import "Pkg" textdomain "packager" @@ -46,7 +44,16 @@ def main ) end - copy_zypp_cache + # copy the credential files, libzypp loads them from target + zypp_dir = "/etc/zypp" + credentials_d = zypp_dir + "/credentials.d" + + if File.exist?(credentials_d) && Installation.destdir != "/" + target_zypp = Installation.destdir + zypp_dir + Builtins.y2milestone("Copying libzypp credentials to #{target_zypp}...") + ::FileUtils.mkdir_p(target_zypp) + ::FileUtils.cp_r(credentials_d, target_zypp) + end # installation, for instance... if !Mode.update @@ -131,22 +138,6 @@ def main :next end - # copy the zypp cache to the target system (only when running in inst-sys!) - # to save some memory during installation - def copy_zypp_cache - return unless Stage.initial - - # copy the credential files (libzypp loads them from target) - # and the repository cache to the target system - Pkg.SourceCacheCopyTo(Installation.destdir) - - # symlink the cache from inst-sys to save same space (RAM!) - cache_path = Pkg.ZConfig()["repo_cache_path"] || "/var/cache/zypp" - log.info("Zypp cache size: #{`du -h -s #{cache_path.shellescape}`}") - ::FileUtils.rm_rf(cache_path) - File.symlink(File.join(Installation.destdir, cache_path), cache_path) - end - # Handle the backup. def backup_stuff if Installation.update_backup_modified diff --git a/src/lib/packager/clients/pkg_finish.rb b/src/lib/packager/clients/pkg_finish.rb index c3a1a58f5..2c886efe4 100644 --- a/src/lib/packager/clients/pkg_finish.rb +++ b/src/lib/packager/clients/pkg_finish.rb @@ -98,6 +98,10 @@ def write Pkg.SourceSaveAll Pkg.TargetFinish + # save repository metadata cache to the installed system + # (needs to be done _after_ saving repositories, see bnc#700881) + Pkg.SourceCacheCopyTo(Installation.destdir) + # Patching /etc/zypp/zypp.conf in order not to install # recommended packages, doc-packages,... # (needed for products like CASP) diff --git a/test/pkg_finish_test.rb b/test/pkg_finish_test.rb index 690753b78..1b414bc5d 100755 --- a/test/pkg_finish_test.rb +++ b/test/pkg_finish_test.rb @@ -68,6 +68,7 @@ expect(Yast::Pkg).to receive(:SourceLoad) expect(Yast::Pkg).to receive(:SourceSaveAll) expect(Yast::Pkg).to receive(:TargetFinish) + expect(Yast::Pkg).to receive(:SourceCacheCopyTo).with(destdir) allow(Yast::WFM).to receive(:Execute) expect(client.run).to be_nil end From 81b22dececbf3b3ca100ecadc79025c8d321f614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Tue, 6 Apr 2021 16:14:18 +0200 Subject: [PATCH 38/50] Remove .coveralls.yml file It is not needed anymore --- .coveralls.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 91600595a..000000000 --- a/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -service_name: travis-ci From a48a1b3064b33e2ae2340090fe06c93df0a05576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20D=C3=ADaz=20Gonz=C3=A1lez?= Date: Wed, 7 Apr 2021 12:05:57 +0100 Subject: [PATCH 39/50] Hide the abort button on inst_lan client Since it is being called in a installation sub-workflow, the abort button will not work as expected. It was hide when calling from inst_productsources too because it was not working as expected (aborting the loop for asking the user to configure the network) See https://bugzilla.suse.com/show_bug.cgi?id=1183586 --- src/lib/y2packager/clients/inst_productsources.rb | 10 +++------- src/modules/SourceDialogs.rb | 5 ++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/lib/y2packager/clients/inst_productsources.rb b/src/lib/y2packager/clients/inst_productsources.rb index 50c8ce746..971475d83 100644 --- a/src/lib/y2packager/clients/inst_productsources.rb +++ b/src/lib/y2packager/clients/inst_productsources.rb @@ -337,16 +337,12 @@ def NetworkRunning end Builtins.y2milestone("User wants to setup the network") + # Call InstLan client - netret = WFM.call( + WFM.call( "inst_lan", - [GetInstArgs.argmap.merge("skip_detection" => true)] + [GetInstArgs.argmap.merge("skip_detection" => true, "hide_abort_button" => true)] ) - - if netret == :abort - Builtins.y2milestone("Aborting the network setup") - break - end end ret diff --git a/src/modules/SourceDialogs.rb b/src/modules/SourceDialogs.rb index f2d2023df..30c23888f 100644 --- a/src/modules/SourceDialogs.rb +++ b/src/modules/SourceDialogs.rb @@ -2217,7 +2217,10 @@ def SelectHandle(_key, event) RefreshTypeWidgets() return nil when :network - Yast::WFM.CallFunction("inst_lan", [{ "skip_detection" => true }]) + Yast::WFM.CallFunction( + "inst_lan", + [{ "skip_detection" => true, "hide_abort_button" => true }] + ) end return nil if event["ID"] != :next && event["ID"] != :ok From 542ae33c6a549cb554c6a26c3b3a6dbf90bf4dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20D=C3=ADaz=20Gonz=C3=A1lez?= Date: Wed, 7 Apr 2021 12:07:19 +0100 Subject: [PATCH 40/50] Bump version and update changelog --- package/yast2-packager.changes | 7 +++++++ package/yast2-packager.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 332b47160..44f37f098 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 7 11:06:45 UTC 2021 - David Diaz + +- Hide the abort button when the network client is called + (bsc#1183586). +- 4.4.0 + ------------------------------------------------------------------- Thu Mar 18 16:33:19 UTC 2021 - Ladislav Slezák diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index ae165e30c..a748e698e 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.20 +Version: 4.4.0 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From d34d1d04861f04571f8f60407e22dae3fc044462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Mon, 24 May 2021 13:16:56 +0200 Subject: [PATCH 41/50] Use "packager" ID --- src/lib/y2packager/installation_data.rb | 99 +++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 src/lib/y2packager/installation_data.rb diff --git a/src/lib/y2packager/installation_data.rb b/src/lib/y2packager/installation_data.rb new file mode 100644 index 000000000..39c5f73bf --- /dev/null +++ b/src/lib/y2packager/installation_data.rb @@ -0,0 +1,99 @@ +# Copyright (c) [2021] 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 "installation/installation_info" +require "y2packager/medium_type" +require "y2packager/product_reader" +require "y2packager/resolvable" + +Yast.import "Mode" +Yast.import "Pkg" + +module Y2Packager + # Class for dumping the general installation data. + class InstallationData + # Register the callback for dumping the general installation data + def register_callback + # already registered + return if ::Installation::InstallationInfo.instance.callback?("packager") + + ::Installation::InstallationInfo.instance.add_callback("packager") do + data = { + "mode" => Yast::Mode.mode, + "medium_type" => Y2Packager::MediumType.type_value, + "repositories" => repositories, + "services" => services, + "available_base_products" => available_base_products, + "products" => products + } + + add_update_data(data) if Yast::Mode.update + + data + end + end + + private + + def products + Y2Packager::Resolvable.find(kind: :product).map do |product| + { + "name" => product.name, + "version" => product.version, + "display_name" => product.display_name, + "status" => product.status, + "vendor" => product.vendor, + "repository" => product.source, + "path" => product.path + } + end + end + + def available_base_products + Y2Packager::ProductReader.new.available_base_products.map do |product| + { + "name" => product.name, + "version" => product.version, + "display_name" => product.display_name, + "vendor" => product.vendor + } + end + end + + def repositories + Yast::Pkg.SourceGetCurrent(false).map do |repo| + Yast::Pkg.SourceGeneralData(repo) + end + end + + def services + Yast::Pkg.ServiceAliases.map do |s| + Yast::Pkg.ServiceGet(s) + end + end + + # add update data + def add_update_data(data) + # evaluating root partitions in upgrade + Yast.import "RootPart" + data["root_partitions"] = Yast::RootPart.rootPartitions + data["selected_root_partition"] = Yast::RootPart.selectedRootPartition + end + end +end From 1904fd74b36286ed23ab1b498b09e0aad0ea6734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Mon, 24 May 2021 13:17:10 +0200 Subject: [PATCH 42/50] 4.4.2 --- package/yast2-packager.changes | 8 ++++++++ package/yast2-packager.spec | 10 +++++----- src/lib/y2packager/medium_type.rb | 9 +++++++++ test/installation_data_test.rb | 26 ++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 test/installation_data_test.rb diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index b499f8234..bf32b246f 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon May 24 11:16:11 UTC 2021 - Ladislav Slezák + +- Logging all available product information into directory + /var/log/YaST2/installation_info. This should help for evaluating + the cause of e.g. bsc#1180888, bsc#1180908, bsc#1178688. +- 4.4.2 + ------------------------------------------------------------------- Thu Apr 22 07:51:02 UTC 2021 - Ladislav Slezák diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 3c84be527..35a4d818f 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.4.1 +Version: 4.4.2 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later @@ -36,8 +36,8 @@ BuildRequires: rubygem(%{rb_default_ruby_abi}:nokogiri) BuildRequires: yast2-storage-ng >= 4.0.141 # break the yast2-packager -> yast2-storage-ng -> yast2-packager build cycle #!BuildIgnore: yast2-packager -# Y2Packager::Repositories -BuildRequires: yast2 >= 4.2.60 +# Installation::InstallationInfo +BuildRequires: yast2 >= 4.4.4 # raw_name BuildRequires: yast2-pkg-bindings >= 4.2.8 # Augeas lenses @@ -48,8 +48,8 @@ BuildRequires: ruby-solv Requires: yast2-country-data >= 2.16.3 # raw_name Requires: yast2-pkg-bindings >= 4.2.8 -# Y2Packager::Repositories -Requires: yast2 >= 4.2.60 +# Installation::InstallationInfo +Requires: yast2 >= 4.4.4 # unzipping license file Requires: unzip # HTTP, FTP, HTTPS modules (inst_productsources.ycp) diff --git a/src/lib/y2packager/medium_type.rb b/src/lib/y2packager/medium_type.rb index e00cdc176..686c79ed2 100644 --- a/src/lib/y2packager/medium_type.rb +++ b/src/lib/y2packager/medium_type.rb @@ -33,6 +33,15 @@ def type @type ||= detect_medium_type end + # Returns the cached medium type value. If the medium detection has not been + # called yet (via the `type` method) then it returns `nil`. + # + # @see .type + # @return [Symbol,nil] Symbol describing the medium or `nil` + def type_value + @type + end + # Possible types for type value POSSIBLE_TYPES = [:online, :offline, :standard].freeze diff --git a/test/installation_data_test.rb b/test/installation_data_test.rb new file mode 100644 index 000000000..b37f4ddda --- /dev/null +++ b/test/installation_data_test.rb @@ -0,0 +1,26 @@ +require_relative "test_helper" +require "y2packager/installation_data" + +describe Y2Packager::InstallationData do + describe "#register_callback" do + it "adds the default product callback" do + expect(::Installation::InstallationInfo.instance) + .to receive(:callback?).with("installation").and_return(false) + + expect(::Installation::InstallationInfo.instance) + .to receive(:add_callback).with("installation") + + subject.register_callback + end + + it "does not add the callback if it is already defined" do + expect(::Installation::InstallationInfo.instance) + .to receive(:callback?).with("installation").and_return(true) + + expect(::Installation::InstallationInfo.instance) + .to_not receive(:add_callback) + + subject.register_callback + end + end +end From 9ffc4b9d27e32438bdfe98d312c456fe9a5772dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Mon, 24 May 2021 15:17:50 +0200 Subject: [PATCH 43/50] Update unit test --- test/installation_data_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/installation_data_test.rb b/test/installation_data_test.rb index b37f4ddda..0733c7210 100644 --- a/test/installation_data_test.rb +++ b/test/installation_data_test.rb @@ -5,17 +5,17 @@ describe "#register_callback" do it "adds the default product callback" do expect(::Installation::InstallationInfo.instance) - .to receive(:callback?).with("installation").and_return(false) + .to receive(:callback?).with("packager").and_return(false) expect(::Installation::InstallationInfo.instance) - .to receive(:add_callback).with("installation") + .to receive(:add_callback).with("packager") subject.register_callback end it "does not add the callback if it is already defined" do expect(::Installation::InstallationInfo.instance) - .to receive(:callback?).with("installation").and_return(true) + .to receive(:callback?).with("packager").and_return(true) expect(::Installation::InstallationInfo.instance) .to_not receive(:add_callback) From 3c951f77c0fb737e15d610e5a6683bce33dafc32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Wed, 26 May 2021 18:46:58 +0200 Subject: [PATCH 44/50] Use "armv7hl" packages on "armv7l" (bsc#1183795) --- src/lib/y2packager/solvable_pool.rb | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/lib/y2packager/solvable_pool.rb b/src/lib/y2packager/solvable_pool.rb index 357a8a2bf..7359bb40a 100644 --- a/src/lib/y2packager/solvable_pool.rb +++ b/src/lib/y2packager/solvable_pool.rb @@ -10,14 +10,18 @@ # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # ------------------------------------------------------------------------------ +require "etc" require "solv" +require "yast" module Y2Packager # This is a wrapper for the Solv::Pool class class SolvablePool + include Yast::Logger + def initialize @pool = Solv::Pool.new - @pool.setarch + @pool.setarch(arch) end # @@ -35,5 +39,23 @@ def add_rpmmd_repo(primary_xml, name) end attr_reader :pool + + private + + # detect the system architecture + # @return [String] the machine architecture, equivalent to "uname -m" + def arch + # get the machine architecture name ("uname -m") + arch = Etc.uname[:machine] + log.info "Detected system architecture: #{arch}" + + # use "armv7hl" packages on "armv7l" (bsc#1183795) + if arch == "armv7l" + arch = "armv7hl" + log.info "Using #{arch} package architecture" + end + + arch + end end end From 58506a34438dbb8578c50dd6ff15d96d7aa6bad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Wed, 26 May 2021 18:46:58 +0200 Subject: [PATCH 45/50] Use "armv7hl" packages on "armv7l" (bsc#1183795) --- src/lib/y2packager/solvable_pool.rb | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/lib/y2packager/solvable_pool.rb b/src/lib/y2packager/solvable_pool.rb index 357a8a2bf..7359bb40a 100644 --- a/src/lib/y2packager/solvable_pool.rb +++ b/src/lib/y2packager/solvable_pool.rb @@ -10,14 +10,18 @@ # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # ------------------------------------------------------------------------------ +require "etc" require "solv" +require "yast" module Y2Packager # This is a wrapper for the Solv::Pool class class SolvablePool + include Yast::Logger + def initialize @pool = Solv::Pool.new - @pool.setarch + @pool.setarch(arch) end # @@ -35,5 +39,23 @@ def add_rpmmd_repo(primary_xml, name) end attr_reader :pool + + private + + # detect the system architecture + # @return [String] the machine architecture, equivalent to "uname -m" + def arch + # get the machine architecture name ("uname -m") + arch = Etc.uname[:machine] + log.info "Detected system architecture: #{arch}" + + # use "armv7hl" packages on "armv7l" (bsc#1183795) + if arch == "armv7l" + arch = "armv7hl" + log.info "Using #{arch} package architecture" + end + + arch + end end end From 590f0aec5080f4bbeb67b9d4908431c84cfb1468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 27 May 2021 09:44:19 +0200 Subject: [PATCH 46/50] 4.3.22 --- package/yast2-packager.changes | 7 +++++++ package/yast2-packager.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 0b8721cee..ca0b7c786 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu May 27 07:43:27 UTC 2021 - Ladislav Slezák + +- Use the "armv7hl" packages on the "armv7l" architecture + (bsc#1183795) +- 4.3.22 + ------------------------------------------------------------------- Tue Apr 6 13:06:27 UTC 2021 - Ladislav Slezák diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index db78c37ea..9acf2ac4e 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.21 +Version: 4.3.22 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From 9f6c33bcfd866252b54c213920baf089d7409da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Tue, 15 Jun 2021 16:34:47 +0100 Subject: [PATCH 47/50] Fix the Comment entry in the desktop file --- src/desktop/org.opensuse.yast.SWSource.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/desktop/org.opensuse.yast.SWSource.desktop b/src/desktop/org.opensuse.yast.SWSource.desktop index e566ebfd9..e1bb4a19e 100644 --- a/src/desktop/org.opensuse.yast.SWSource.desktop +++ b/src/desktop/org.opensuse.yast.SWSource.desktop @@ -21,5 +21,5 @@ Exec=xdg-su -c "/sbin/yast2 repositories" Name=YaST Software Repositories GenericName=Software Repositories -Comment=Choose the repositories for installation of software packages (CD, network, etc.), add the community repositories +Comment="Choose the repositories for installation of software packages (CD, network, etc.), add the community repositories" StartupNotify=true From 89f9db71c04681920c2f726f0001624a19b047b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Tue, 15 Jun 2021 16:35:38 +0100 Subject: [PATCH 48/50] Bump version and update changes file --- package/yast2-packager.changes | 7 +++++++ package/yast2-packager.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index 5ca552b10..773e133aa 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 15 09:17:24 UTC 2021 - Imobach Gonzalez Sosa + +- Fix the Comment entry in the desktop file so the tooltip + in the control center is properly translated (bsc#1187270). +- 4.2.70 + ------------------------------------------------------------------- Fri Feb 19 13:21:25 UTC 2021 - Josef Reidinger diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index 5f4bd012f..45ae2787b 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.2.69 +Version: 4.2.70 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later From 1f54426a1ab6804fa7071ea1464a4d8eface11a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 17 Jun 2021 17:46:23 +0200 Subject: [PATCH 49/50] Fixed editing repository name (bsc#1184935) --- src/lib/packager/clients/repositories.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/packager/clients/repositories.rb b/src/lib/packager/clients/repositories.rb index f289f798f..8b5155d0e 100644 --- a/src/lib/packager/clients/repositories.rb +++ b/src/lib/packager/clients/repositories.rb @@ -1791,7 +1791,12 @@ def repo_replace_handler(source_state, global_current) old_url = url2 plaindir = Ops.get_string(generalData, "type", "YaST") == @plaindir_type - SourceDialogs.SetRepoName(source_state.fetch("raw_name", "")) + repo_name = source_state.fetch("raw_name", "") + # if the repository does not define a name then "raw_name" is empty, + # display "name" which contains the repository alias in that case + repo_name = source_state.fetch("name", "") if repo_name.empty? + + SourceDialogs.SetRepoName(repo_name) begin url2 = SourceDialogs.EditPopupType(url2, plaindir) From 067d1abb029ef154bb00d904f696da20ce6fdfc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 17 Jun 2021 17:49:59 +0200 Subject: [PATCH 50/50] 4.3.24 --- package/yast2-packager.changes | 8 ++++++++ package/yast2-packager.spec | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package/yast2-packager.changes b/package/yast2-packager.changes index e9dded520..944c6c5a3 100644 --- a/package/yast2-packager.changes +++ b/package/yast2-packager.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jun 17 15:47:33 UTC 2021 - Ladislav Slezák + +- When editing a repository display the repository alias as a + fallback if the repository name is not set, do not display + empty name (bsc#1184935) +- 4.3.24 + ------------------------------------------------------------------- Tue Jun 15 09:17:24 UTC 2021 - Imobach Gonzalez Sosa diff --git a/package/yast2-packager.spec b/package/yast2-packager.spec index d1b4e687b..111e9b768 100644 --- a/package/yast2-packager.spec +++ b/package/yast2-packager.spec @@ -17,7 +17,7 @@ Name: yast2-packager -Version: 4.3.23 +Version: 4.3.24 Release: 0 Summary: YaST2 - Package Library License: GPL-2.0-or-later