Skip to content

Commit

Permalink
Disable empty Online medium repository (bsc#1182303)
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Jan 9, 2024
1 parent 62a900a commit b97b269
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions package/yast2-packager.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jan 9 13:39:32 UTC 2024 - Ladislav Slezák <lslezak@suse.com>

- After installation disable the empty installation repository
from the SLE15 Online medium (bsc#1182303)
- 4.5.18

-------------------------------------------------------------------
Fri May 5 08:34:49 UTC 2023 - Ladislav Slezák <lslezak@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-packager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-packager
Version: 4.5.17
Version: 4.5.18
Release: 0
Summary: YaST2 - Package Library
License: GPL-2.0-or-later
Expand Down
6 changes: 5 additions & 1 deletion src/lib/packager/clients/pkg_finish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

require "installation/finish_client"
require "y2packager/repository"
require "y2packager/resolvable"
require "packager/cfa/zypp_conf"
require "packager/cfa/dnf_conf"

Expand Down Expand Up @@ -192,7 +193,10 @@ def disable_local_repos
log.info "Not installed base products: #{non_installed_base.map(&:name)} "

local_repos.each_with_object([]) do |repo, disabled|
if repo.products.empty?
# No product but the repository is not empty => most likely a 3rd party
# repository, do not touch it.
# The empty repository on the SLE Online medium is disabled by the code below.
if repo.products.empty? && Y2Packager::Resolvable.any?(kind: :package, source: repo.repo_id)
log.info("Repo #{repo.repo_id} (#{repo.name}) does not have products; ignored")
next
end
Expand Down

0 comments on commit b97b269

Please sign in to comment.