Bug 384114

Summary: zypper is lying
Product: [openSUSE] openSUSE 11.0 Reporter: Stephan Kulow <coolo>
Component: libzyppAssignee: Michael Schröder <mls>
Status: RESOLVED FIXED QA Contact: Duncan Mac-Vicar <dmacvicar>
Severity: Normal    
Priority: P5 - None CC: aj, schubi
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: zypper.log

Description Stephan Kulow 2008-04-26 14:48:02 UTC
# zypper remove libpoppler2 libpoppler-qt4-2
Lese installierte Pakete...

Die folgenden Pakete werden erneut installiert:
  libpoppler3 libpoppler-qt4-3


Die folgenden Pakete werden GELÖSCHT:
  libpoppler2 libpoppler-qt4-2


Gesamtgröße des Herunterladens: 807,0 K. Nach dem Vorgang wird 2,6 M freigegeben.
Fortfahren? [JA/nein]:
Herunterladen von Paket libpoppler3-0.8.0-4.x86_64, 673,0 K (2,5 M installiert)
* Lade herunter: libpoppler3-0.8.0-4.x86_64.rpm [fertig (219,8 K/s)]
* Installiere: libpoppler3-0.8.0-4
Herunterladen von Paket libpoppler-qt4-3-0.8.0-4.x86_64, 134,0 K (441,0 K installiert)
* Lade herunter: libpoppler-qt4-3-0.8.0-4.x86_64.rpm [fertig]
* Installiere: libpoppler-qt4-3-0.8.0-4

It's _not_ removing anything. I can repeat that command several times with always the same result.
Comment 1 Stephan Kulow 2008-04-26 14:48:52 UTC
Created attachment 210683 [details]
zypper.log
Comment 2 Jan Kupec 2008-04-26 17:59:30 UTC
Never! zypper is telling the truth! :O) Zypper shows what libzypp says, but libzypp then suddenly changes its mind. Here is the relevant part of the log:

 [zypper] zypper-misc.cc(summary):1133 Install summary:
 [zypper] zypper-misc.cc(summary):1172 <install>   (27409)libpoppler-qt4-3-0.8.0-4.x86_64(factory)
 [zypper] zypper-misc.cc(summary):1172 <install>   (27411)libpoppler3-0.8.0-4.x86_64(factory)
 [zypper] zypper-misc.cc(summary):1172 <uninstall> (50029)libpoppler-qt4-2-0.6.4-2.x86_64(@System)
 [zypper] zypper-misc.cc(summary):1172 <uninstall> (50030)libpoppler-qt4-3-0.8.0-4.x86_64(@System)
 [zypper] zypper-misc.cc(summary):1172 <uninstall> (50031)libpoppler2-0.6.4-2.x86_64(@System)
 [zypper] zypper-misc.cc(summary):1172 <uninstall> (50032)libpoppler3-0.8.0-4.x86_64(@System)
 [zypper] zypper-prompt.cc(get_prompt_reply):216 reply empty, returning the default: ja (0)
 [zypp] ZYppImpl.cc(commit):133 Attempt to commit (CommitPolicy( ))
 [zypp] TargetImpl.cc(commit):461 TargetImpl::commit(<pool>, CommitPolicy( ))
 [zypp::GetResolvablesToInsDel] GetResolvablesToInsDel.cc(GetResolvablesToInsDel):128 Ignore auto_delete (should be upgraded): I_TsU(50030)libpoppler-qt4-3-0.8.0-4.x86_64(@System)
 [zypp::GetResolvablesToInsDel] GetResolvablesToInsDel.cc(GetResolvablesToInsDel):128 Ignore auto_delete (should be upgraded): I_TsU(50032)libpoppler3-0.8.0-4.x86_64(@System)
 [zypp::GetResolvablesToInsDel] GetResolvablesToInsDel.cc(GetResolvablesToInsDel):136 ResolvablesToInsDel: delete 2, install 2, srcinstall 0
 [zypp::GetResolvablesToInsDel] GetResolvablesToInsDel.cc(strip_obsoleted_to_delete):81 Ignore appl_delete (should be obsoleted): I_Ts_(50029)libpoppler-qt4-2-0.6.4-2.x86_64(@System)
 [zypp::GetResolvablesToInsDel] GetResolvablesToInsDel.cc(strip_obsoleted_to_delete):81 Ignore appl_delete (should be obsoleted): I_Ts_(50031)libpoppler2-0.6.4-2.x86_64(@System)
 [zypp] InstallOrder.cc(InstallOrder):65 InstallOrder::InstallOrder(_toinstall 2 items, _installed 0 items)
Comment 3 Stephan Kulow 2008-04-26 18:36:00 UTC
I guess libzypp assumes rpm to delete the obsoleted package - and I guess it would do that if just rpm --nodeps was in the call.
Comment 4 Stefan Schubert 2008-04-28 14:56:02 UTC
Could you please generate a testcase.
Comment 5 Stephan Kulow 2008-04-28 15:06:19 UTC
~coolo/Export/tc/384114 - don't want to attach it as it's pretty huge
Comment 6 Stefan Schubert 2008-04-29 09:08:16 UTC
Michael, the testcase retunrns:
>!> remove  libpoppler-qt4-2-0.6.4-2.x86_64
>!> upgrade libpoppler-qt4-3-0.8.0-4.x86_64 =>                   
libpoppler-qt4-3-0.8.0-4.x86_64[factory]

I cannot wyh the solver takes this solution
Comment 7 Michael Schröder 2008-04-30 09:01:02 UTC
solver_printdecisions() says:
upgrade   libpoppler-qt4-3-0.8.0-4.x86_64  
  (obsoletes libpoppler-qt4-2-0.6.4-2.x86_64
             libpoppler-qt4-3-0.8.0-4.x86_64)
upgrade   libpoppler3-0.8.0-4.x86_64
  (obsoletes libpoppler2-0.6.4-2.x86_64
             libpoppler3-0.8.0-4.x86_64)

I'd love to see the output of:
rpm --test --force --nodeps -hUvv libpoppler3-0.8.0-4

Comment 8 Michael Schröder 2008-04-30 09:04:37 UTC
(And why on earth are erase jobs translated to "erase provides"?? Is that just a bug in the testcase generator?)
Comment 9 Michael Schröder 2008-04-30 09:11:32 UTC
(heh. it takes this solution because of "forceResolve". Nevertheless, we need to fix the solver to be in sync with rpm, so comments #7 and #8 still hold)
Comment 10 Stephan Kulow 2008-04-30 09:21:36 UTC
Not sure what it helps

coolo@noname#~>rpm --test --force --nodeps -hUvv libpoppler3-0.8.0-4
D: ============== libpoppler3-0.8.0-4
error: open of libpoppler3-0.8.0-4 failed: Datei oder Verzeichnis nicht gefunden
D: found 0 source and 0 binary packages
D: May free Score board((nil))
Comment 11 Michael Schröder 2008-04-30 09:23:11 UTC
Argh, please specify a path to the rpm.
Comment 12 Stephan Kulow 2008-04-30 09:44:21 UTC
D:  ... as /var/tmp/rpm-xfer.wjUbts
D: ============== /var/tmp/rpm-xfer.wjUbts
D: Expected size:       688412 = lead(96)+sigs(348)+pad(4)+data(687964)
D:   Actual size:       688412
D: opening  db environment /var/lib/rpm/Packages create:cdb:mpool:private
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Pubkeys rdonly:nofsync mode=0x0
D:  read h#     669 Header sanity check: OK
D: ========== DSA pubkey id a84edae8 9c800aca (h#669)
D: /var/tmp/rpm-xfer.wjUbts: Header V3 DSA signature: OK, key ID 9c800aca
D: opening  db index       /var/lib/rpm/Name rdonly:nofsync mode=0x0
D:  read h#    2381 Header V3 DSA signature: OK, key ID 9c800aca
D: opening  db index       /var/lib/rpm/Providename rdonly:nofsync mode=0x0
D:  read h#    1000 Header V3 DSA signature: OK, key ID 9c800aca
D:      added binary package [0]
D: found 0 source and 1 binary packages
D: ========== recording tsort relations
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth, breadth)
D:     0    0    0    0    1    0   +libpoppler3-0.8.0-4.x86_64
D: installing binary packages
D: mounted filesystems:
D:     i        dev    bsize       bavail       iavail mount point
D:     0 0x00000806     4096       591516       844160 /
D:     1 0x00000003     4096            0           -1 /proc
D:     2 0x00000000     4096            0           -1 /sys
D:     3 0x0000000e     4096            0           -1 /sys/kernel/debug
D:     4 0x0000000f     4096       254515       253531 /dev
D:     5 0x0000000b     4096            0           -1 /dev/pts
D:     6 0x00000808     4096      8519884      6063306 /home
D:     7 0x00000801     4096      1400242      5707658 /windows/C
D:     8 0x00000803     4096       346351      1418135 /windows/D
D:     9 0x00000011     4096            0           -1 /sys/fs/fuse/connections
D: sanity checking 1 elements
D: computing 10 file fingerprints
Preparing...                D: computing file dispositions
D: opening  db index       /var/lib/rpm/Basenames rdonly:nofsync mode=0x0
########################################### [100%]
D: ========== +++ libpoppler3-0.8.0-4 x86_64-linux 0x0
D: Expected size:       688412 = lead(96)+sigs(348)+pad(4)+data(687964)
D:   Actual size:       688412
D: libpoppler3-0.8.0-4: Header V3 DSA signature: OK, key ID 9c800aca
D:   install: libpoppler3-0.8.0-4 has 10 files, test = 1
D: closed   db index       /var/lib/rpm/Pubkeys
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Basenames
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))
Comment 13 Michael Schröder 2008-04-30 11:04:05 UTC
Ok, found it. Contrary to popular belief rpm in stable does not check the provides when searching for obsolete packages. This is because a chunk of the
"noprovides.diff" was put into "nameversioncompare.diff" by accident. Thus, when we reverted a part of noprovides it still didn't work. Bummer.

Anyway, as nobody complained by now, this is the chance to align our rpm again with rpm4 upstream! We don't install projects anymore, so we do not need obsoletes on provides. Yay! Anybody against this change?

(Note also that without this bug, updating libpoppler3 automatically removes libpoppler2. So much for having multiple versions installed...)
Comment 14 Stefan Schubert 2008-04-30 11:28:03 UTC
comment #8
The request in the testcase is:
<addConflict  name="libpoppler2"/>

The job will be generated by deptestomatic. 

      queue_push( &(pd->trials), SOLVER_ERASE_SOLVABLE_PROVIDES );
      queue_push( &(pd->trials), str2id( pd->pool, name, 1 ) );

Hm, so I have taken it in libzypp too. Shall we replace it ?
Comment 15 Michael Schröder 2008-05-05 11:12:55 UTC
*** Bug 386646 has been marked as a duplicate of this bug. ***
Comment 16 Michael Schröder 2008-07-09 15:41:30 UTC
I think this is fixed (except for the dist update case).