Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yast/yast-yast2 into split_url
Browse files Browse the repository at this point in the history
Conflicts:
	package/yast2.changes
  • Loading branch information
jreidinger committed May 28, 2014
2 parents f97ad61 + 0af1a27 commit f31374a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 108 deletions.
109 changes: 2 additions & 107 deletions library/packages/src/modules/PackageSystem.rb
Expand Up @@ -213,111 +213,9 @@ def DoInstallAndRemoveInt(toinstall, toremove)
@last_op_canceled = false
end


# check if the database is consistent before packages are added
packages_consistent = Pkg.PkgSolveCheckTargetOnly
transact = Pkg.IsAnyResolvable(:any, :to_install) ||
Pkg.IsAnyResolvable(:any, :to_remove)

Builtins.y2internal(
"Target solved: %1, something to transact: %2",
packages_consistent,
transact
)

return false if !SelectPackages(toinstall, toremove)

packager_displayed = false

# display an error message and advice to manually fix the system
if !packages_consistent || transact
Builtins.y2warning("The current system is not consistent")

message = _(
"The current system is not consistent,\nsome packages have unresolved dependencies."
)

if !packages_consistent
message = Ops.add(
Ops.add(message, "\n\n"),
_(
"Automatic resolving failed, manual dependency resolving is needed."
)
)
end

if transact
message = Ops.add(
Ops.add(message, "\n\n"),
_(
"Yast has automatically added or removed some packages,\n" +
"check the changes scheduled to fix the system\n" +
"in the software manager."
)
)
end


message = Ops.add(
Ops.add(message, "\n\n"),
_(
"Start the software manager and fix the problems\nor skip fixing and install the already confirmed packages only?"
)
)

fixsystem = Popup.AnyQuestion3(
Label.WarningMsg,
message,
Label.ContinueButton,
Label.SkipButton,
Label.AbortButton,
:focus_yes
)

Builtins.y2milestone("Fixsystem answer: %1", fixsystem)

# the 3rd button ("Abort" label in this case)
if fixsystem == :retry
Builtins.y2milestone("Aborting package installation")
# do not install anything, abort
return false
elsif fixsystem == :yes
# disable repomanagement during installation
repomgmt = !Mode.installation
# start the package selector
ret = PackagesUI.RunPackageSelector(
{ "enable_repo_mgr" => repomgmt, "mode" => :summaryMode }
)

Builtins.y2internal("Package selector returned: %1", ret)

# do not install anything
if ret == :cancel || ret == :close
Builtins.y2milestone("Aborting package installation")
return false
end

packager_displayed = true
# `no = do not fix the system, install the required packages only
# and ignore the inconsistencies
elsif fixsystem == :no
Builtins.y2milestone("Resetting the preselected packages")
# reset the solver - disable the fixsystem solver mode (bnc#439373)
Pkg.SetSolverFlags({ "reset" => true })
# reset the preselected transactions to fix the problems
Pkg.PkgApplReset

# reselect the packages again after the reset
return false if !SelectPackages(toinstall, toremove)
else
Builtins.y2internal("Unknown result %1, aborting", fixsystem)
return false
end
end

solved = Pkg.PkgSolve(false)

if solved != true
if !Pkg.PkgSolve(false)
Builtins.y2error("Package solve failed: %1", Pkg.LastError)

# error message, after pressing [OK] the package manager is displayed
Expand All @@ -338,8 +236,6 @@ def DoInstallAndRemoveInt(toinstall, toremove)

# do not fix the system
return false if ret == :cancel || ret == :close

packager_displayed = true
end

# is a package or a patch selected for installation?
Expand Down Expand Up @@ -379,8 +275,7 @@ def DoInstallAndRemoveInt(toinstall, toremove)
end

# check if the required packages have been installed
# (user could deselect or uninstall them in the packager widget)
if packager_displayed && !InstalledAll(toinstall)
if !InstalledAll(toinstall)
Builtins.y2error("Required packages have not been installed")
return false
end
Expand Down
7 changes: 7 additions & 0 deletions package/yast2.changes
Expand Up @@ -2,6 +2,13 @@
Wed May 28 10:39:00 UTC 2014 - jreidinger@suse.com

- split too wide urls for accepting GnuGP key (bnc#870822)
- 3.1.70

-------------------------------------------------------------------
Wed May 28 10:00:17 UTC 2014 - lslezak@suse.cz

- removed system verification check when yast module installs
required packages (bnc#866256)
- 3.1.69

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


Name: yast2
Version: 3.1.69
Version: 3.1.70
Release: 0
URL: https://github.com/yast/yast-yast2

Expand Down

0 comments on commit f31374a

Please sign in to comment.