Skip to content

Commit

Permalink
Merge e1b1c7f into 03e8ef6
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Jul 27, 2022
2 parents 03e8ef6 + e1b1c7f commit 93a301b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
19 changes: 16 additions & 3 deletions library/packages/src/modules/PackageSystem.rb
Expand Up @@ -154,8 +154,8 @@ def DoInstallAndRemoveInt(toinstall, toremove)
Builtins.y2debug("toinstall: %1, toremove: %2", toinstall, toremove)
return false if !PackageLock.Check

EnsureSourceInit()
EnsureTargetInit()
EnsureSourceInit()
ok = true

Yast.import "Label"
Expand Down Expand Up @@ -272,9 +272,20 @@ def DoInstallAndRemoveInt(toinstall, toremove)
true
end

# Install and remove requested packages
# @note The packages are by default installed also with soft dependencies
# (like Recommends or Supplements)
# @param toinstall [Array<String>] the list of package to install (package names)
# @param toremove [Array<String>] the list of package to remove (package names)
# @return [Boolean] `true`` on success, `false` on error
def DoInstallAndRemove(toinstall, toremove)
toinstall = deep_copy(toinstall)
toremove = deep_copy(toremove)
return false if !PackageLock.Check

# the DoInstallAndRemoveInt() call initializes the libzypp internally
# but we need initialized libzypp earlier to change the solver settings
EnsureTargetInit()
EnsureSourceInit()

# remember the current solver flags
solver_flags = Pkg.GetSolverFlags

Expand All @@ -292,6 +303,7 @@ def DoInstallAndRemove(toinstall, toremove)
# Is a package available?
# @return true if yes (nil = no package source available)
def Available(package)
EnsureTargetInit()
EnsureSourceInit()

# at least one enabled repository present?
Expand Down Expand Up @@ -362,6 +374,7 @@ def PackageInstalled(package)
# Is a package available? Checks only package name, not list of provides.
# @return true if yes (nil = no package source available)
def PackageAvailable(package)
EnsureTargetInit()
EnsureSourceInit()

# at least one enabled repository present?
Expand Down
7 changes: 7 additions & 0 deletions package/yast2.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jul 27 13:41:45 UTC 2022 - Ladislav Slezák <lslezak@suse.cz>

- Fixed libzypp initialization, in the YaST container read the
configured repositories from the host (related to bsc#1199840)
- 4.5.8

-------------------------------------------------------------------
Fri Jul 22 12:13:13 UTC 2022 - Ladislav Slezák <lslezak@suse.cz>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 4.5.7
Version: 4.5.8

Release: 0
Summary: YaST2 Main Package
Expand Down

0 comments on commit 93a301b

Please sign in to comment.