Since we have staging for Factory/Tumbleweed, it became surprisingly stable. Major breakages at least for core packages are really rare now. But even for leaf packages it is not a common sight.
One thing was still annoying: for upgrading you should use
zypper dist-upgrade or short
zypper dup normally.
zypper dup will upgrade all the packages to the latest version it finds but also downgrade/uninstall packages, if required. Something a
zypper up will not do. This is all fine when you only use the core distribution repositories. If you start using e.g. packman or any other repository from the build service, zypper did switch around the package to the distribution package and a few days later back to the OBS based repository. Depending on what was newer. It is allowed to do that because
zypper dup allows also vendor changes.
You could solve part of the problem with repository priorities. But that made the life hard, when you wanted to use e.g. the original package from the distribution, while the same package was also available from a repository with a higher priority.
Luckily zypper is opensource and we can change it.
The solution is forming
At first Michael Andres added a little environment variable for testing.
$ export SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE=0 $ zypper dup
Woohoo! Finally it stopped shuffling around packages. I also reported it on #opensuse-factory and was told that little gem popped up in many more places from there.
While the current solution worked fine, it needs some more polishing for our
users. As a first step Michael added command line options
$ zypper help dup ... Expert options: --[no-]allow-downgrade Whether to allow downgrading installed resolvables [yes]. --[no-]allow-name-change Whether to allow changing the names of installed resolvables [yes]. --[no-]allow-arch-change Whether to allow changing the architecture of installed resolvables [yes]. --[no-]allow-vendor-change Whether to allow changing the vendor of installed resolvables [yes].
The first version had a small bug, but the current version works fine. Who likes to remember and type the same command line options every time, you call a command? Correct. Nobody. So zypp.conf to the rescue. Matching the command line options we will get the following entries for zypp.conf:
# solver.dupAllowDowngrade = true # solver.dupAllowNameChange = true # solver.dupAllowArchChange = true # solver.dupAllowVendorChange = true
All options are set to true, to keep the original
zypper dup behavior. For our desired behavior we set
The zypp version is currently pending for factory. Once that is available in Tumbleweed, we can finally drop the environment variable.
Now the SUSE Linux Enterprise users might complain “they get all the good new stuff”. In this case an unneeded complaint. SLES 12 SP1 will get this zypper version as well.
Happy living on the edge!