FS#24904 - pacman does not handle the file -> directory case with conflicts

Attached to Project: Pacman
Opened by Ionut Biru (wonder) - Monday, 27 June 2011, 08:48 GMT
Last edited by Allan McRae (Allan) - Tuesday, 19 July 2011, 05:25 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version 3.5.3
Due in Version 4.0.0
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Summary and Info:

:: Replace zope-interface with extra/python2-zope-interface? [Y/n] y
resolving dependencies...
looking for inter-conflicts...

Remove (1): zope-interface-3.6.3-1

Total Removed Size: 0.97 MB

Targets (8): dbus-glib-0.94-2 fb-client-0.8.1-1 neon-0.29.6-2 perl-xml-parser-2.41-1 pyalpm-0.4.3-1 readline-6.2.001-2 shadow-4.1.4.3-2 python2-zope-interface-3.6.3-1

Total Download Size: 0.00 MB
Total Installed Size: 8.70 MB

Proceed with installation? [Y/n]
(8/8) checking package integrity [################################################################] 100%
(8/8) checking for file conflicts [################################################################] 100%
error: failed to commit transaction (conflicting files)
python2-zope-interface: /usr/lib/python2.7/site-packages/zope.interface-3.6.3-py2.7.egg-info/ exists in filesystem
Errors occurred, no packages were upgraded.


In zope-interface package /usr/lib/python2.7/site-packages/zope.interface-3.6.3-py2.7.egg-info is a file and in python2-zope-interface /usr/lib/python2.7/site-packages/zope.interface-3.6.3-py2.7.egg-info/ is a directory

debug log attached
   plain (20.9 KiB)
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 19 July 2011, 05:25 GMT
Reason for closing:  Fixed
Additional comments about closing:  http://projects.archlinux.org/pacman.git /commit/?h=maint&id=e378170c
Comment by Jens Adam (byte) - Monday, 27 June 2011, 10:24 GMT
For reference, the reverse case:  FS#13932 
Comment by Dan McGee (toofishes) - Monday, 27 June 2011, 11:59 GMT
I assume this only fails in the case where a package is renamed/replaced, but not in the "normal" upgrade case?
Comment by Ionut Biru (wonder) - Monday, 27 June 2011, 12:59 GMT
right, only with replaces
Comment by Dan McGee (toofishes) - Monday, 27 June 2011, 13:18 GMT
Were both replaces and conflicts specified here, or what was done in the PKGBUILD? This bug report is missing a slimmed down test case.
Comment by Ionut Biru (wonder) - Monday, 27 June 2011, 13:20 GMT
http://projects.archlinux.org/svntogit/packages.git/tree/zope-interface/trunk/PKGBUILD#n42

i tried locally with conflicts=(zope-interface) to try at least to have a clean update but it didn't take it in consideration.
Comment by Dan McGee (toofishes) - Monday, 27 June 2011, 13:58 GMT
OK, I have this figured out, a test case written, and a patch for it as well. It comes down to doing path comparisons with and without trailing slashes; because we saw the new file as a directory the name did not match up with the to be removed file due to the missing trailing slash. Solving this impedance mismatch allows our current code to do the comparison correctly.

I don't anticipate the fix getting out too quickly however as this is quite the edge case if we didn't even have test coverage for it yet.
Comment by Dan McGee (toofishes) - Monday, 27 June 2011, 15:17 GMT
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Due in Version (Undecided → 4.0.0)
  • Task assigned to Dan McGee (toofishes)
If we do a 3.5.4 this will land there, but that is unlikely as of now.

Loading...