openSUSE / libsolv

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

Problem with package remove and multiarch #525

Closed j-mracek closed 1 year ago

j-mracek commented 1 year ago

May I ask you to look at following test case? The test case generates following error message:

Problem: problem with installed package libpq-14.1-2.fc36.i686
  - libpq-14.1-2.fc36.i686 has inferior architecture

Interesting is that the issue is reproducible only when available repository called updates in the test case is present.

repo @System 0 testtags <inline>
#>=Pkg: libpq 14.1 2 i686
#>=Prv: libpq = 14.1-2
#>=Pkg: libpq 14.1 2 x86_64
#>=Prv: libpq = 14.1-2

repo updates 0 testtags <inline>
#>=Pkg: libpq 14.1 2 i686
#>=Prv: libpq = 14.1-2
#>=Pkg: libpq 14.1 2 x86_64
#>=Prv: libpq = 14.1-2

system x86_64 rpm @System
poolflags implicitobsoleteusescolors whatprovideswithdisabled

solverflags allowvendorchange keepexplicitobsoletes bestobeypolicy keeporphans yumobsoletes
job erase pkg libpq-14.1-2.x86_64@@System
result transaction,problems <inline>
#>erase libpq-14.1-2.x86_64@@System
mlschroe commented 1 year ago

Yeah, I think it shouldn't insist on keeping the i586<->x86_64 lockstep if the user explicitly asked to break it. Having said that, why is the updates repo visible for erase operations?

j-mracek commented 1 year ago

Yeah, I think it shouldn't insist on keeping the i586<->x86_64 lockstep if the user explicitly asked to break it. Having said that, why is the updates repo visible for erase operations?

The issue is triggered by dnf history undo <id> - see https://bugzilla.redhat.com/show_bug.cgi?id=2172288. DNF doesn't know in advance whether the operation will be only remove or a combination or something else. As a reproducer could also be used dnf shell command where DNF first loads all data and then user specify requests from interactive shell.

mlschroe commented 1 year ago

Ok, commit 634371f143e5c0d4244dd46084d0aa7ccdb3967c should fix it.