Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/SLE-15-SP6' into service_fix_master
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Sep 20, 2023
2 parents 32b04b6 + a0d058f commit b2eba07
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
9 changes: 9 additions & 0 deletions package/yast2-packager.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Sep 20 15:58:33 UTC 2023 - Ladislav Slezák <lslezak@suse.com>

- Properly save the repo file when changing URL of a repository
from a service (bsc#1214135)
- Also display a warning when changing URL of a service repository,
the change might be lost after the service is refreshed
- 5.0.1

-------------------------------------------------------------------
Wed Aug 30 20:16:10 UTC 2023 - Josef Reidinger <jreidinger@suse.cz>

Expand Down
10 changes: 5 additions & 5 deletions package/yast2-packager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-packager
Version: 5.0.0
Version: 5.0.1
Release: 0
Summary: YaST2 - Package Library
License: GPL-2.0-or-later
Expand All @@ -38,8 +38,8 @@ BuildRequires: yast2-storage-ng >= 4.0.141
#!BuildIgnore: yast2-packager
# Replace PackageSystem with Package
BuildRequires: yast2 >= 4.4.38
# raw_name
BuildRequires: yast2-pkg-bindings >= 4.2.8
# "service" attribute in Pkg.SourceEditSet()
BuildRequires: yast2-pkg-bindings >= 5.0.2
# yast/rspec/helpers.rb
BuildRequires: yast2-ruby-bindings >= 4.4.7
# Augeas lenses
Expand All @@ -48,8 +48,8 @@ BuildRequires: ruby-solv

# Newly added RPM
Requires: yast2-country-data >= 2.16.3
# raw_name
Requires: yast2-pkg-bindings >= 4.2.8
# "service" attribute in Pkg.SourceEditSet()
Requires: yast2-pkg-bindings >= 5.0.2
# Replace PackageSystem with Package
Requires: yast2 >= 4.4.38
# unzipping license file
Expand Down
9 changes: 7 additions & 2 deletions src/lib/packager/clients/repositories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1854,6 +1854,8 @@ def repo_replace_handler(source_state, global_current)
end

if !same_url || plaindir != SourceDialogs.IsPlainDir
warn_service_repository(source_state)

Builtins.y2milestone(
"URL or plaindir flag changed, recreating the source"
)
Expand Down Expand Up @@ -1896,20 +1898,23 @@ def repo_replace_handler(source_state, global_current)
"priority",
@default_priority
)
service = source_state["service"] || ""
Builtins.y2milestone(
"Restoring the original properties: enabled: %1, autorefresh: %2, " \
"keeppackages: %3, priority: %4",
"keeppackages: %3, priority: %4, service: %5",
enabled,
auto_refresh,
keeppackages,
priority
priority,
service
)

# set the original properties
Ops.set(addedSource, "autorefresh", auto_refresh)
Ops.set(addedSource, "keeppackages", keeppackages)
Ops.set(addedSource, "enabled", enabled)
Ops.set(addedSource, "priority", priority)
Ops.set(addedSource, "service", service)

# get the ID of the old repo and mark it for removal
srcid = Ops.get_integer(
Expand Down

0 comments on commit b2eba07

Please sign in to comment.