[pacman-dev] Conflict when replacing a folder with subfolders by a file in a package update

Timothée Ravier siosm99 at gmail.com
Mon Aug 5 10:33:03 EDT 2013


Hi,

Pacman exits with a conflict error if the package updated is replacing a
folder with subfolders inside by a single file with the same name.

This may be a bug as I don't know any cases where this cloud make sense.
But I may be wrong of course. I'll let you decide.

Testing was done on fully updated Arch Linux system with the following
repositories enabled: kf5, kde-unstable, testing, core, extra,
community-testing, community, multilib-testing, multilib.

Example PKGBUILDs to reproduce the issue:

$ cat PKGBUILD.1
pkgname=testpkg
pkgver=1
pkgrel=1
pkgdesc="Test package"
arch=('i686' 'x86_64')
license=('GPL')

package() {
  cd "${pkgdir}"
  mkdir -p usr/test/test
}

$ cat PKGBUILD.2
pkgname=testpkg
pkgver=1
pkgrel=2
pkgdesc="Test package"
arch=('i686' 'x86_64')
license=('GPL')

package() {
  cd "${pkgdir}"
  mkdir usr
  touch usr/test
}

Pacman output:
$ sudo pacman -U testpkg-1-2-x86_64.pkg.tar.xz
loading packages...
resolving dependencies...
looking for inter-conflicts...

Packages (1):

Name     Old Version  New Version  Net Change

testpkg  1-1          1-2            0.00 MiB

Total Installed Size:   0.00 MiB
Net Upgrade Size:       0.00 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)
testpkg: /usr/test exists in filesystem
Errors occurred, no packages were upgraded.

Cheers,

Tim


More information about the pacman-dev mailing list