[zypp-devel] ignore with solver
Hi, due to FATE #303527 I plan add new item to enum Action to mediaRequestCallback. Behavior of this action is remember package which fail to download and throw it from libzypp. Program like zypper catch this exception, say solver that this package don't use and try make new installation plan without problematic package. Maybe IgnoreRequestException can be used, due to it's not used anywhere in zypp (and is userRequest exception). any ideas or comments? Also is KEEP_STATE (in ResStatus) good to say solver that it cannot use this package? Thanks, Pepa -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Josef Reidinger napsal(a):
Hi, due to FATE #303527 I plan add new item to enum Action to mediaRequestCallback. Behavior of this action is remember package which fail to download and throw it from libzypp. Program like zypper catch this exception, say solver that this package don't use and try make new installation plan without problematic package. Maybe IgnoreRequestException can be used, due to it's not used anywhere in zypp (and is userRequest exception). any ideas or comments? Also is KEEP_STATE (in ResStatus) good to say solver that it cannot use this package?
I'm sorry, but what does this exactly mean in human-speech? :) ;) Thx Lukas
Lukas Ocilka wrote:
Josef Reidinger napsal(a):
Hi, due to FATE #303527 I plan add new item to enum Action to mediaRequestCallback. Behavior of this action is remember package which fail to download and throw it from libzypp. Program like zypper catch this exception, say solver that this package don't use and try make new installation plan without problematic package. Maybe IgnoreRequestException can be used, due to it's not used anywhere in zypp (and is userRequest exception). any ideas or comments? Also is KEEP_STATE (in ResStatus) good to say solver that it cannot use this package?
I'm sorry, but what does this exactly mean in human-speech? :) ;)
Thx Lukas
This mean that user choose some packages to install. Solver add prerequisites for this packages. Some prerequisite cannot be download and if use this new action (instead of retry or abort or simply ignore) program try make for user new prerequisites combination without previously failed package. For programmers that uses libzypp it mean, that they must (if support this action in callback) catch from commit call exception, disable this package instalation for solver, rerun solver and try again commit (of course with any user responses if really want new plan or if not possible install without this package then some as do standard). Pepa -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Tue, Mar 18, Josef Reidinger wrote:
For programmers that uses libzypp it mean, that they must (if support this action in callback) catch from commit call exception, disable this package instalation for solver, rerun solver and try again commit (of course with any user responses if really want new plan or if not possible install without this package then some as do standard).
Something like this is easily doable once we separate download and install. Downloading packages into a chache we can easily stop at any time (after the first error, collecting all errors). We can handle these errors by disabling packages as well as complete repositories. We can even refresh or change repositories. But once we are in commit (actually installing packages) we have to be carefull. The system might be in an inconsistent state and if we don't have enough system to rescan the rpm database and recreate the solv file, we are stuck. I somewhat dislike to suggest that it's save and easy to abort the running transaction and try soemthing else. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Michael Andres napsal(a):
On Tue, Mar 18, Josef Reidinger wrote:
For programmers that uses libzypp it mean, that they must (if support this action in callback) catch from commit call exception, disable this package instalation for solver, rerun solver and try again commit (of course with any user responses if really want new plan or if not possible install without this package then some as do standard).
Something like this is easily doable once we separate download and install.
Downloading packages into a chache we can easily stop at any time (after the first error, collecting all errors).
We can handle these errors by disabling packages as well as complete repositories. We can even refresh or change repositories.
But once we are in commit (actually installing packages) we have to be carefull. The system might be in an inconsistent state and if we don't have enough system to rescan the rpm database and recreate the solv file, we are stuck. I somewhat dislike to suggest that it's save and easy to abort the running transaction and try soemthing else.
Yes, you are right. Unrolling package that installed before failing one can be really horrible. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Tue, Mar 18, Josef Reidinger wrote:
Hi, due to FATE #303527 I plan add new item to enum Action to mediaRequestCallback. Behavior of this action is remember package which fail to download and throw it from libzypp. Program like zypper catch this exception, say solver that this package don't use and try make new installation plan without problematic package. Maybe IgnoreRequestException can be used, due to it's not used anywhere in zypp (and is userRequest exception). any ideas or comments?
Nice idea if we use it together with a 'download all packages before commit' policy.
Also is KEEP_STATE (in ResStatus) good to say solver that it cannot use this package?
No, KEEP_STATE should (IMO) just prevent the solver from selecting this because it's recommended. If it's required the solver may choose it. One should use LOCKED. The same flow could be used if the user decides not to accept a license. Question is just whether there are alternatives. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (4)
-
josef reidiner
-
Josef Reidinger
-
Lukas Ocilka
-
Michael Andres