Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#30681 - Files moved from symlinked dir to another cause conflict on upgrade

Attached to Project: Pacman
Opened by Marti (intgr) - Saturday, 14 July 2012, 23:08 GMT
Last edited by Allan McRae (Allan) - Friday, 14 December 2012, 02:47 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To Allan McRae (Allan)
Dave Reisner (falconindy)
Architecture All
Severity Medium
Priority Normal
Reported Version 4.0.3
Due in Version 4.1.0
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Summary and Info:
When a package upgrade moves some file from one directory to another, where the directories are symlinks to the same place, then pacman thinks this upgrade has file conflicts. But actually there's no conflict -- the old file would disappear when uninstalling the earlier version.

This is problematic for e.g. packages moving their files from /lib to /usr/lib. Case in point, openct: https://aur.archlinux.org/packages.php?ID=10155

Steps to Reproduce:
==== PKGBUILD v1 ====
pkgname=foo
pkgver=1
pkgrel=1
arch=(any)
build() {
mkdir -p $pkgdir/lib
touch $pkgdir/lib/foo
}

==== PKGBUILD v2 ====
pkgname=foo
pkgver=2
pkgrel=1
arch=(any)
build() {
mkdir -p $pkgdir/usr/lib
touch $pkgdir/usr/lib/foo
}

==== example ====
1. Build and install foo v1
2. Build foo v2
3. Install breaks:
# pacman -U foo-2-1-any.pkg.tar.gz
Targets (1): foo-2-1
(1/1) checking for file conflicts [############################################################] 100%
error: failed to commit transaction (conflicting files)
foo: /usr/lib/foo exists in filesystem
Errors occurred, no packages were upgraded.

# pacman -Ql foo
foo /lib/
foo /lib/foo
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 14 December 2012, 02:47 GMT
Reason for closing:  Fixed
Additional comments about closing:  git commit 948f135a
Comment by Daniel Wallace (gtmanfred) - Sunday, 15 July 2012, 01:09 GMT
I don't think this is a bug, nothing should install to /lib anymore, it should all just be packaged in /usr/lib
Comment by Marti (intgr) - Sunday, 15 July 2012, 01:39 GMT
I'm sure there are plenty of AUR packages that still install to /lib -- and fixing those now requires manual intervention by every user (uninstall & reinstall).

And it's a generic problem with directory symlinks, not specific to /lib. We'll have another round of problems soon as we start to migrate out of /bin.
Comment by Daniel Wallace (gtmanfred) - Sunday, 15 July 2012, 01:52 GMT
oh right, would cause bugs with packages moving.
Comment by Dave Reisner (falconindy) - Sunday, 15 July 2012, 03:21 GMT

Loading...