[zypp-devel] prevent user programs from being removed on dups.
Zypper -dup may choose to remove important user programs if it can not satisfy its dependencies. This is especially the case if zypper wants to switch the arch of certain packages as in Bug 506801 (https://bugzilla.novell.com/show_bug.cgi?id=506801). My suggestion would be not to let zypper purge any non-lib packages unless the force option is used. Another approach would be to simply collect a set of core packages which should never be removed on a dup (without force). My suggestion for this would be to add all packages which are installed by a minimum system installation via the Opensuse installer to /etc/zypp/systemCheck. There is always a lot of output if you initiate a zypper dup and packages to be deleted are easily overlooked so that I would prefer an overrestraining approach that requires a --force for perfectly reasonable dups in favour of a too sloppy one. What do you think about it? -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Tuesday 04 August 2009 20:45:41 Elmar Stellnberger wrote:
Zypper -dup may choose to remove important user programs if it can not satisfy its dependencies. This is especially the case if zypper wants to switch the arch of certain packages as in Bug 506801 (https://bugzilla.novell.com/show_bug.cgi?id=506801).
Where you did a 'zypper dup --repo myrepo', and several packages got deleted because the solver assumes they are orphaned. This happens because --repo currently hides all repos except myrepo from the solver. A few days ago I wrote about the new Resolver::addUpgradeRepo which is intended to solve this problem. With this call the solver is aware of all repos and should be able to make better decisions. What bothers me more than the content of /etc/zypp/systemCheck (which is a user config file), is the question whether it is actually worth to keep the old 'zypper dup --repo' behaviour? It's a shortcut for disble all repos except myrepo zypper dup enable the repos again IMO this is not a feature, but just worked around a missing functionality in the solver. Now as the functionality is present, I'd prefer to fix '--repo' instead on introducing a new '--form' option. I wouldn't consider this as breaking backward compatibility, but fixing a buggy and dangerous behavior. -- 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 wrote:
On Tuesday 04 August 2009 20:45:41 Elmar Stellnberger wrote:
Zypper -dup may choose to remove important user programs if it can not satisfy its dependencies. This is especially the case if zypper wants to switch the arch of certain packages as in Bug 506801 (https://bugzilla.novell.com/show_bug.cgi?id=506801).
Where you did a 'zypper dup --repo myrepo', and several packages got deleted because the solver assumes they are orphaned. This happens because --repo currently hides all repos except myrepo from the solver.
Yes, Elmar knows that. I suggested to bring this up on this list because this can happen with any command (even 'zypper rm glibc'). I wonder why we ship the systemCheck with only glibc. Although it's up to the user to edit this file, why not put more stuff there?
A few days ago I wrote about the new Resolver::addUpgradeRepo which is intended to solve this problem. With this call the solver is aware of all repos and should be able to make better decisions.
What bothers me more than the content of /etc/zypp/systemCheck (which is a user config file), is the question whether it is actually worth to keep the old 'zypper dup --repo' behaviour?
It's a shortcut for
disble all repos except myrepo zypper dup enable the repos again
Exactly. In short - load only the specified repos for current operation.
IMO this is not a feature, but just worked around a missing functionality in the solver. Now as the functionality is present, I'd prefer to fix '--repo' instead on introducing a new '--form' option.
I wouldn't consider this as breaking backward compatibility, but fixing a buggy and dangerous behavior.
OK, IMO current --repo makes sense as well (for developers at least, if not users), but since i am apparently the only one who thinks so, i'll be happy to change it to what i proposed to be --from. Starting with dup, and later, as we add necessary API to libzypp also in the other commands. If anyone wants to keep this feature, please speak up! I vote for keeping it :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)---
Personally I would not mind dup --repo being removed. Nonetheless independently from this updating /etc/zypp/systemCheck, as Jano said, will be a good idea. On the other hand why not keep a functionality which is already implemented and might make sense in some cases. My suggestion for this would be to keep dup but to make it always require the --force option. This will require no additional implementation effort (unless the check I have previously proposed). If --force is not specified alongside with dup --repo a message should prompt the user either to use --from instead or to add the --force option. Jano Kupec schrieb:
Michael Andres wrote:
On Tuesday 04 August 2009 20:45:41 Elmar Stellnberger wrote:
Zypper -dup may choose to remove important user programs if it can not satisfy its dependencies. This is especially the case if zypper wants to switch the arch of certain packages as in Bug 506801 (https://bugzilla.novell.com/show_bug.cgi?id=506801). Where you did a 'zypper dup --repo myrepo', and several packages got deleted because the solver assumes they are orphaned. This happens because --repo currently hides all repos except myrepo from the solver.
Yes, Elmar knows that. I suggested to bring this up on this list because this can happen with any command (even 'zypper rm glibc'). I wonder why we ship the systemCheck with only glibc. Although it's up to the user to edit this file, why not put more stuff there?
A few days ago I wrote about the new Resolver::addUpgradeRepo which is intended to solve this problem. With this call the solver is aware of all repos and should be able to make better decisions.
What bothers me more than the content of /etc/zypp/systemCheck (which is a user config file), is the question whether it is actually worth to keep the old 'zypper dup --repo' behaviour?
It's a shortcut for
disble all repos except myrepo zypper dup enable the repos again
Exactly. In short - load only the specified repos for current operation.
IMO this is not a feature, but just worked around a missing functionality in the solver. Now as the functionality is present, I'd prefer to fix '--repo' instead on introducing a new '--form' option.
I wouldn't consider this as breaking backward compatibility, but fixing a buggy and dangerous behavior.
OK, IMO current --repo makes sense as well (for developers at least, if not users), but since i am apparently the only one who thinks so, i'll be happy to change it to what i proposed to be --from. Starting with dup, and later, as we add necessary API to libzypp also in the other commands.
If anyone wants to keep this feature, please speak up! I vote for keeping it :O)
-- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Wednesday 05 August 2009 13:04:47 Elmar Stellnberger wrote:
On the other hand why not keep a functionality which is already implemented and might make sense in some cases. My suggestion for this would be to keep dup but to make it always require the --force option.
Why staying with the inferior algorithm (as default)?
This will require no additional implementation effort (unless the check I have previously proposed). If --force is not specified alongside with dup --repo a message should prompt the user either to use --from instead or to add the --force option.
I'd say 'NO', because -- independently form any --force -- the computed transaction might be worse, than the one computed by upgradeRepo. It may very well be that additionally updating a package in an other repo allows to keep a bunch of packages instead of removing them. The solver will also try harder to keep a package which has an update path to some known repo, than an orphaned one (one not provided by any repo). The current 'dup -r' declares too many packages as orphaned. -- 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 Wednesday 05 August 2009 12:55:36 Jano Kupec wrote:
Michael Andres wrote:
On Tuesday 04 August 2009 20:45:41 Elmar Stellnberger wrote:
this can happen with any command (even 'zypper rm glibc'). I wonder why we ship the systemCheck with only glibc. Although it's up to the user to edit this file, why not put more stuff there?
/etc/zypp/systemCheck is a user config file and glibc is a simple example which does not hurt if being required. The original intent was to prevent zypper from accidentally cleaning the whole system, because zypper sets ForceResolve which allows the solver to consider deleting conflicting packages. But it should not be necessary any more, as zypp internally instructs the solver to keep 'rpm' installed. A suggested set of core packages would be product specific. In that case we had to offer an /etc/zypp/systemCheck.d directory, where products (the release-packages) could drop the definition of their 'core' sets. But the set of core packages is also defined by the dependencies of the release-package which represents your product (e.g openSUSE-release). So a product would have to write e.g: requires:openSUSE-release We can also leave it to the user to decide this. Maybe you want to change/remove a product, then those requirements are annoying. -- 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 (3)
-
Elmar Stellnberger
-
Jano Kupec
-
Michael Andres