FS#38580 - [apache-ant] Package fails to upgrade

Attached to Project: Arch Linux
Opened by Rick Prego (rprego) - Sunday, 19 January 2014, 22:16 GMT
Last edited by Guillaume ALAUX (galaux) - Friday, 24 January 2014, 14:22 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Guillaume ALAUX (galaux)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 18
Private No

Details

Description:
When trying to upgrade from apache-ant-1.9.3-1 to apache-ant-1.9.3-2 using pacman, the install fails with the following error: apache-ant: /usr/share/apache-ant/etc exists in filesystem


Additional info:
* Currently installed version: apache-ant-1.9.3-1
* New version: apache-ant-1.9.3-2


Steps to reproduce:
1. Attempt system upgrade with pacman
2. Upgrade fails

Full details:
$ sudo pacman -Su apache-ant
:: Starting full system upgrade...
resolving dependencies...
looking for inter-conflicts...

Packages (1): apache-ant-1.9.3-2

Total Installed Size: 2.64 MiB
Net Upgrade Size: -11.62 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [################################] 100%
(1/1) checking package integrity [################################] 100%
(1/1) loading package files [################################] 100%
(1/1) checking for file conflicts [################################] 100%
error: failed to commit transaction (conflicting files)
apache-ant: /usr/share/apache-ant/etc exists in filesystem
Errors occurred, no packages were upgraded.
This task depends upon

Closed by  Guillaume ALAUX (galaux)
Friday, 24 January 2014, 14:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  User action required
Comment by Lucas Raab (tuftedocelot) - Sunday, 19 January 2014, 23:13 GMT
Confirming this behavior on my system. Only difference in output given is I used -Syu. That being said, uninstalling, removing /usr/share/apache-ant/, and reinstalling is sufficient to continue on.
Comment by mark (mmm) - Sunday, 19 January 2014, 23:21 GMT
confirm with -Syu, should be [testing] though.
Little strange is the dir itself (.../share/apache-ant/etc)is not owned by anything, while the files in it (normaly) belong to apache-ant.

(11/11) checking for file conflicts [###############################################################] 100%
error: failed to commit transaction (conflicting files)
apache-ant: /usr/share/apache-ant/etc exists in filesystem
Errors occurred, no packages were upgraded.
[marek@beruska flash]$ yaourt -Qo /usr/share/apache-ant/etc
error: No package owns /usr/share/apache-ant/etc
[marek@beruska flash]$ ls /usr/share/apache-ant/etc/
changelog.xsl coverage-frames.xsl jdepend.xsl junit-frames.xsl log.xsl mmetrics-frames.xsl
checkstyle/ jdepend-frames.xsl junit-frames-xalan1.xsl junit-noframes.xsl maudit-frames.xsl tagdiff.xsl
[marek@beruska flash]$ yaourt -Qo /usr/share/apache-ant/etc/jdepend.xsl
/usr/share/apache-ant/etc/jdepend.xsl is owned by apache-ant 1.9.3-1
[marek@beruska flash]$ yaourt -Qo /usr/share/apache-ant
/usr/share/apache-ant is owned by apache-ant 1.9.3-1
[marek@beruska flash]$ yaourt -Qo /usr/share/apache-ant/etc/
error: No package owns /usr/share/apache-ant/etc
[marek@beruska flash]$ yaourt -Qo /usr/share/apache-ant/etc/log.xsl
/usr/share/apache-ant/etc/log.xsl is owned by apache-ant 1.9.3-1

Thanks
Comment by Rick Prego (rprego) - Monday, 20 January 2014, 02:00 GMT
@tuftedocelot What I did to upgrade it was exactly what you suggested. I uninstalled, removed /usr/share/apache-ant, and then installed the new version. Still not sure why this happened, though.
Comment by Thomas Dziedzic (tomd123) - Monday, 20 January 2014, 05:54 GMT
The reason for this behavior is the result of this commit:
https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/apache-ant&id=fe2ca4a5a1b0549fd08f5f07262ccd292a90f0e7

Previously, that symlink was getting created in the .install file which is untracked.
Now it gets created in the pkgbuild which is tracked.

Upgrade happens and pacman sees the conflict and stops the upgrade.

It's easy to fix though, sudo rm /usr/share/apache-ant/etc && sudo pacman -Syu
Comment by Guillaume ALAUX (galaux) - Wednesday, 22 January 2014, 09:11 GMT
Right! Please manually remove this very unfortunate link that got created some times ago (the commit mentionned by Thomas is a try to get back on track).
As Thomas says, a simple rm or unlink does the trick.
@Thomas: Thanks for having answered this. Feel free to assign bug reports to me when they involve some of my packages.
Comment by kkl2401 (kkl2401) - Thursday, 23 January 2014, 12:51 GMT
I know that apache-ant probably isn't one of the "mainstream" packages but it still is in extra. Doesn't it usually go the way that a short message is added to the news on the main site (and RSS) when any kind of manual involvement when updating the whole system is necessary?
Comment by Guillaume ALAUX (galaux) - Thursday, 23 January 2014, 13:28 GMT
As you said, apache-ant is not installed in many Arch boxes so a whole message on the website looked overkill. I kind of expected this sort of bug report but also thouhgt that most people would manage to sort things out by themselves. If not then the answer given here will make it. Sorry: you guys were the firsts to witness it :) .

Loading...