You are not logged in.

#1 2018-10-26 02:19:47

rstoyanov
Member
Registered: 2016-01-01
Posts: 7

mkdir: error: failed to commit transaction (conflicting files)

Hello everyone,

I want to build the package xz-static-git [1] which aims to be the Arch version of the xz-static rpm [2].

Since the rpm contains only two files, "liblzma.a" and "COPYING", I defined the package() function as follows:

package() {
	cd xz/
	mkdir -p "$pkgdir/usr/lib64/"
	mkdir -p "$pkgdir/usr/share/doc/xz/"

	install -Dm755 src/liblzma/.libs/liblzma.a "${pkgdir}/usr/lib64/"
	install -Dm644 COPYING "${pkgdir}/usr/share/doc/xz/"
}

However, when I tried to installing the package, pacman fails with:

error: failed to commit transaction (conflicting files)
xz-static-git: /usr/lib64 exists in filesystem (owned by filesystem)
xz-static-git: /usr/share/doc/xz/COPYING exists in filesystem (owned by xz)
Errors occurred, no packages were upgraded.

If I remove the "mkdir" operations from package() then makepkg fails with

install: target ... xz-static-PKGBUILD/pkg/xz-static-git/usr/lib64/' is not a directory: No such file or directory

What is the proper way to resolve this issue?

[1] https://aur.archlinux.org/packages/xz-static-git/
[2] https://fedora.pkgs.org/28/fedora-updat … 4.rpm.html

Last edited by rstoyanov (2018-10-26 02:29:05)

Offline

#2 2018-10-26 04:39:00

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: mkdir: error: failed to commit transaction (conflicting files)

You're specifically telling it to install a file to /usr/lib64/. Don't do that.

Online

#3 2018-10-26 05:58:31

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,392
Website

Re: mkdir: error: failed to commit transaction (conflicting files)

As above, but you also cant replace files in packages.  Just do a full make install and replace the xz package.

Offline

#4 2018-10-26 08:23:40

rstoyanov
Member
Registered: 2016-01-01
Posts: 7

Re: mkdir: error: failed to commit transaction (conflicting files)

@Scimmia and @Allan thank you for the feedback!
I changed the PKGBUILD to do a full install and therefore replace the xz package.

Offline

#5 2018-10-26 16:06:07

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: mkdir: error: failed to commit transaction (conflicting files)

Why do you even want xz-static in the first place? That being said, I see no reason why you should need to install docs at all. If you just wanted to install a static library, nothing was stopping you from *only* packaging the liblzma.a file.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2018-10-26 17:36:01

rstoyanov
Member
Registered: 2016-01-01
Posts: 7

Re: mkdir: error: failed to commit transaction (conflicting files)

Hi @eschwartz,
I need the liblzma.a file because it is a dependency for libvirt-sandbox to enable lzma support.
Do you think that it is a good idea to push the liblzma.a file instead of building xz from source?

Offline

#7 2018-10-26 18:35:17

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: mkdir: error: failed to commit transaction (conflicting files)

That's... exciting. The program in question seems to be designed for deploying as a statically linked binary into a chroot. In which case, why does it make assumptions about its compilation environment...

I have a pacman-static package in the AUR, which does the needful by building its own liblzma.a and other libraries during build. It also builds a very custom libcurl with options unsuitable for general-purpose use...


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB