Bug 893807

Summary: zypper dup move that doesnt change repositories for packages
Product: [openSUSE] openSUSE Tumbleweed Reporter: Marcus Rückert <mrueckert>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: mls, qantas94heavy
Version: 201408*   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Marcus Rückert 2014-08-27 14:08:32 UTC
Especially with factory, you want to have the possibility to run "zypper dup" regularly to pick up bigger changes. the only problem is ... If you have more repositories than factory in use, it will switch packages around.

I would like to propose a mode that would allow zypper to do bigger changes like zypper dup, without breaking where the packages are pulled from.

If e.g. vlc is installed from videolan, it should not switch to packman, because PM currently has a higher release number. same for ruby extensions which it often moves from dlre to o:Factory.
Comment 1 Michael Andres 2014-09-16 15:13:26 UTC
"zypper dup" is intended to switch to a (new) distribution. It will re-arrange everything, is allowed to change vendor, architecture and do downgrades.

Run "zypper up" instead. 'up' is intended to keep a system up-to-date. It will not change architectures or vendors.
Comment 2 Marcus Rückert 2014-09-16 15:28:02 UTC
zypper up requires a lot of manual work if you run a rolling distribution (aka factory)

you need to manually find out with trial and error *why* a package is not upgraded by "zypper up"

we need something between zypper up and zypper dup.
Comment 3 Michael Andres 2014-09-16 16:01:56 UTC
'zypper dup --from factory' will dup only those packages which are available in factory (note: 'available in factory', not 'installed from factory') ?
Comment 4 Marcus Rückert 2014-09-16 16:19:17 UTC
yes and on my machine right now it would basically move all my rubygem-* packages from d:l:r:e [1] to factory. it should not do that. if a package was installed from d:l:r:e it should stay there.

zypper dup works only if you basically only have base distro repositories.
Otherwise you get lot of switching around of packages between repositories.

e.g. on my system it wants to switch repositories for 86 packages when i do zypper dup --from 16.

[1] devel:languages:ruby:extensions.
Comment 5 Michael Andres 2014-09-16 17:56:50 UTC
So if you basically want a 'dup' without 'vendor change', that's doable. I'll provide a libzypp where you can enable this. If it works reasonable for you, we make a feature out of it :)
Comment 6 Michael Andres 2014-09-17 11:48:30 UTC
With libzypp-14.29.1 you can disable the VENDORCHANGE on dup like this:

 SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE=0 zypper dup

Available in https://build.opensuse.org/project/show/zypp:Head.
Please test if this gives useful results.
Comment 7 Marcus Rückert 2014-09-24 10:25:43 UTC
tested and love it! :D

please make it a zypp.conf option

\\o \o/ o//
Comment 8 Tomáš Chvátal 2014-09-24 10:32:46 UTC
Zypper up won't work on Factory. There are downgrades and only dup reflect on those.
Comment 9 Tomáš Chvátal 2014-09-24 10:34:46 UTC
Erm sorry for the fuzz, on first load it showed me only first comment... So I didn't see it actually being worked on.. grmbl...
Comment 10 Marcus Rückert 2014-09-25 14:57:38 UTC
It would be nice to handle the following scenario:

1. vendor change disabled in zypp.conf
2. zypper dup --from GNOME:STABLE:3.14

"You have vendor change disabled but the operation can only be completed if you allow vendor change"

either

- "Do you want to allow vendor change (y/n): "

or

- "Please rerun with --allow-vendor-change"
Comment 11 Karl Cheng 2017-11-18 10:35:32 UTC
zypper dup without vendor change is now the default on Tumbleweed.