[zypp-devel] [libzyppp-7.4] Cleanup when deleting packages.
Hi. libzyppp-7.4 introduces a new /etc/zypp/zypp.conf option: ## ## Cleanup when deleting packages. Whether the solver should per default ## try to remove packages exclusively required by the ones he's asked to ## delete. ## ## Valid values: boolean ## Default value: false ## # solver.cleandepsOnRemove = false The corresponding methods to get/set the option value in zypp::Resolver, just in case zypper/YaST would like to support this feature: /** * Cleanup when deleting packages. Whether the solver should per default * try to remove packages exclusively required by the ones he's asked to * delete. */ void setCleandepsOnRemove( bool yesno_r ); void setDefaultCleandepsOnRemove(); // set back to default (in zypp.conf) bool cleandepsOnRemove() const; The feature is basically usable. Some small piece of code evaluating the zypp/history, to find out which installed packages were selected by user and which by the resolver, is missing. This will improve the solver result, and will be added the next days. -- 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
On Thu, Apr 29, 2010 at 05:50:02PM +0200, Michael Andres wrote:
libzyppp-7.4 introduces a new /etc/zypp/zypp.conf option: ## ## Cleanup when deleting packages. Whether the solver should per default ## try to remove packages exclusively required by the ones he's asked to ## delete. ## ## Valid values: boolean ## Default value: false ## # solver.cleandepsOnRemove = false
Argh, please do not make this a global option! It should be enabled on a case by cases basis, everthing else will just lead to severe problems. Please remove ASAP! Thanks, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Friday 30 April 2010 11:40:43 Michael Schroeder wrote:
On Thu, Apr 29, 2010 at 05:50:02PM +0200, Michael Andres wrote:
Argh, please do not make this a global option! It should be enabled on a case by cases basis, everthing else will just lead to severe
Of course. The API for zypper/yast to do so is present. AFAIK QT-pkg already offers a switch for it. I'll add an extra CAUTION: note not to change the default... -- 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
On 04/30/2010 12:45 PM, Michael Andres wrote:
On Friday 30 April 2010 11:40:43 Michael Schroeder wrote:
On Thu, Apr 29, 2010 at 05:50:02PM +0200, Michael Andres wrote:
Argh, please do not make this a global option! It should be enabled on a case by cases basis, everthing else will just lead to severe
Of course. The API for zypper/yast to do so is present. AFAIK QT-pkg already offers a switch for it.
I'll add an extra CAUTION: note not to change the default...
Works nicely! At least it appears so :O) What happens if it's enabled even though there's no remove request in the pool? If we put this in zypper.conf, then there's no problem to enable set the flag only if 'remove' command is used (it might be a good idea to have it in zypper.conf anyway, or?) -- cheers, jano Ján Kupec YaST team ---------------------------------------------------------(PGP)--- Key ID: 637EE901 Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901 ---------------------------------------------------------(IRC)--- Server: irc.freenode.net Nick: jniq Channels: #zypp #yast #suse #susecz ---------------------------------------------------------(EOF)---
On Thursday 06 May 2010 16:10:02 Jano Kupec wrote:
What happens if it's enabled even though there's no remove request in the pool?
Nothing. In fact this is not a global solver mode, but requested per delete job. The solver itself is able to remove packages with and without cleanup at the same time. We can enhance the API if e.g. zypper wants to make use of it. -- 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
On 05/07/2010 12:12 PM, Michael Andres wrote:
On Thursday 06 May 2010 16:10:02 Jano Kupec wrote:
What happens if it's enabled even though there's no remove request in the pool?
Nothing. In fact this is not a global solver mode, but requested per delete job. The solver itself is able to remove packages with and without cleanup at the same time. We can enhance the API if e.g. zypper wants to make use of it.
I don't see any use case for per-package setting of this flag now. So no need for that now. But users are pretty inventive, so let's see what they come up with :O) -- cheers, jano Ján Kupec YaST team ---------------------------------------------------------(PGP)--- Key ID: 637EE901 Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901 ---------------------------------------------------------(IRC)--- Server: irc.freenode.net Nick: jniq Channels: #zypp #yast #suse #susecz ---------------------------------------------------------(EOF)---
2010/4/29 Michael Andres <ma@suse.de>:
Hi.
libzyppp-7.4 introduces a new /etc/zypp/zypp.conf option: ## ## Cleanup when deleting packages. Whether the solver should per default ## try to remove packages exclusively required by the ones he's asked to ## delete. ## ## Valid values: boolean ## Default value: false ## # solver.cleandepsOnRemove = false
The corresponding methods to get/set the option value in zypp::Resolver, just in case zypper/YaST would like to support this feature:
/** * Cleanup when deleting packages. Whether the solver should per default * try to remove packages exclusively required by the ones he's asked to * delete. */ void setCleandepsOnRemove( bool yesno_r ); void setDefaultCleandepsOnRemove(); // set back to default (in zypp.conf) bool cleandepsOnRemove() const;
The feature is basically usable. Some small piece of code evaluating the zypp/history, to find out which installed packages were selected by user and which by the resolver, is missing. This will improve the solver result, and will be added the next days.
With this will also be possible to do something as "zypper cleanSystemOfDeps"? I mean, if I select to not clean when I remove a package, will I have the possibility of clean it after? -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Saturday 01 May 2010 11:45:28 Cristian Morales Vega wrote:
2010/4/29 Michael Andres <ma@suse.de>:
With this will also be possible to do something as "zypper cleanSystemOfDeps"? I mean, if I select to not clean when I remove a package, will I have the possibility of clean it after?
No, this flag is tied to a solvers delete request. This can't be used for a global cleanup. -- 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)
-
Cristian Morales Vega
-
Jano Kupec
-
Michael Andres
-
Michael Schroeder