Skip to content

Commit

Permalink
do not skip package proposal when the partitioner has changed propose…
Browse files Browse the repository at this point in the history
…d packages

i.e. add snapper packages after switching to btrfs
(bnc#831875, port from SLE11 bnc#704127)

see commit 6c48fd7
  • Loading branch information
lslezak committed Sep 3, 2013
1 parent 5b3c84d commit e9f8b4e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
4 changes: 4 additions & 0 deletions package/yast2-packager.changes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Tue Sep 3 11:34:48 UTC 2013 - lslezak@suse.cz
initialization was called too late resulting in still 0% total
progress during whole installation (bnc#831875, port from SLE11
bnc#663301) (see commit a1772b138d)
- do not skip package proposal when the partitioner has changed
proposed packages - i.e. add snapper packages after switching to
btrfs (bnc#831875, port from SLE11 bnc#704127) (see commit
6c48fd7761)

-------------------------------------------------------------------
Tue Sep 3 12:31:37 CEST 2013 - jsuchome@suse.cz
Expand Down
2 changes: 1 addition & 1 deletion src/clients/software_proposal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def main

# if only partitioning has been changed just return the current state,
# don't reset to default (bnc#450786, bnc#371875)
if @partition_changed && !@language_changed && !@force_reset
if @partition_changed && !@language_changed && !@force_reset && !Packages.PackagesProposalChanged
return Packages.Summary([ :product, :pattern, :selection, :size, :desktop ], false);
end

Expand Down
24 changes: 18 additions & 6 deletions src/modules/Packages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2081,6 +2081,21 @@ def SelectSystemPackages(reselect)
nil
end

# Check whether the list of needed packages has been changed since the last
# package proposal
#
# @return [boolean] true if PackagesProposal has been changed
def PackagesProposalChanged
new_packages_proposal = PackagesProposal.GetAllResolvablesForAllTypes

# Force reinit
changed = new_packages_proposal != @old_packages_proposal
Builtins.y2milestone("PackagesProposal has been changed: %1", changed)

This comment has been minimized.

Copy link
@jreidinger

jreidinger Sep 3, 2013

Member

wording is slightly strange. I think better is

PackageProposal changed? %1

otherwise it looks like it is changed and you write some elements there.

Builtins.y2debug("PackagesProposal: %1 -> %2", old_packages_proposal, new_packages_proposal)

changed
end

# Make a proposal for package selection
#
# @param force reset (fully resets the proposal and creates a new one)
Expand All @@ -2094,13 +2109,10 @@ def Proposal(force_reset, reinit, simple)
# set ignoreAlreadyRecommended solver flag
Pkg.SetSolverFlags({ "ignoreAlreadyRecommended" => Mode.normal })

# If anything has changed
new_packages_proposal = PackagesProposal.GetAllResolvablesForAllTypes

# Force reinit
if new_packages_proposal != @old_packages_proposal
Builtins.y2milestone("PackagesProposal have changed")
@old_packages_proposal = deep_copy(new_packages_proposal)
if PackagesProposalChanged
@old_packages_proposal = PackagesProposal.GetAllResolvablesForAllTypes
Builtins.y2milestone("Reinit package proposal");
reinit = true
end

Expand Down

0 comments on commit e9f8b4e

Please sign in to comment.