openSUSE / libsolv

Library for solving packages and reading repositories
http://en.opensuse.org/openSUSE:Libzypp_satsolver
Other
512 stars 153 forks source link

Obsoletes behave differently for install and upgrade job #350

Open j-mracek opened 4 years ago

j-mracek commented 4 years ago

It looks like that obsoletes between different arch packages cannot be handled automatically by upgrade job. The issue could be resolved by adding job allowuninstall pkg nss-pem-1.0.4-2.i686@@System, but this is what we want to avoid in default setting.

Please is there any way how we can enhance the behavior of upgrade job?

The problem is described in https://bugzilla.redhat.com/show_bug.cgi?id=1566070 or see testcase bellow.

The test case provides multiple jobs that according to my opinion should result in same transaction.

repo @System 0 testtags <inline>
#>=Pkg: nss-pem 1.0.4 2 i686
#>=Prv: nss-pem = 1.0.4-2
#>=Pkg: nss-pem 1.0.4 2 x86_64
#>=Prv: nss-pem = 1.0.4-2

repo updates 0 testtags <inline>
#>=Pkg: nss-pem 1.0.5 1 x86_64
#>=Prv: nss-pem = 1.0.5-1
#>=Obs: nss-pem < 1.0.5-1

system x86_64 rpm @System
poolflags implicitobsoleteusescolors

solverflags allowvendorchange keepexplicitobsoletes bestobeypolicy keeporphans yumobsoletes
job update oneof nss-pem-1.0.4-2.x86_64@@System nss-pem-1.0.4-2.i686@@System nss-pem-1.0.5-1.x86_64@updates [forcebest,targeted,setevr,setarch]
#job update all packages [forcebest]
#job update all packages
#job install oneof nss-pem-1.0.5-1.x86_64@updates [forcebest,targeted,setevr,setarch]
#job install oneof nss-pem-1.0.5-1.x86_64@updates [setevr,setarch]
result transaction,problems <inline>
#>upgrade nss-pem-1.0.4-2.i686@@System nss-pem-1.0.5-1.x86_64@updates
#>upgrade nss-pem-1.0.4-2.x86_64@@System nss-pem-1.0.5-1.x86_64@updates
mlschroe commented 4 years ago

This is not about updates, but about lock-step. See issue #149 and issue #292. Basically the "setarch" from in install job tells libsolv that it's ok to break the lock-step.

mlschroe commented 4 years ago

Otoh maybe the desired behavior for you is that the update works. Maybe I can do something in that regard.

j-mracek commented 4 years ago

Is there any approach how to keep upgrade path and obsolete i686 but keeping x86_64? Any idea what we can recommend?

j-mracek commented 3 years ago

Any update with the issue. Or is there anything how I can help with the issue?