You are not logged in.

#1 2015-02-21 18:21:08

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

[SOLVED] update: failed to commit transaction (conflicting files)

Heya,

I'm not sure whether there's anything broken with my database/Arch installation or if there's something wrong with the systemd-218-2 package.

When issueing pacman -Syu today I get the following output:
error: failed to commit transaction (conflicting files)
systemd: /var/log exists in filesystem

Full output here:

:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (29) ca-certificates-mozilla-3.17.4-1  chromium-40.0.2214.115-1  djvulibre-3.5.27-1  ghostscript-9.15-2  giflib-5.1.1-1
              gtk-update-icon-cache-2.24.26-1  gtk2-2.24.26-1  krb5-1.13.1-1  lib32-krb5-1.13.1-1  lib32-libpciaccess-0.13.3-1
              libgphoto2-2.5.7-1  libsystemd-218-2  lirc-1:0.9.2.a-1  nspr-4.10.8-1  nss-3.17.4-1  perl-5.20.2-1  python-setuptools-1:12.2-1
              python2-setuptools-1:12.2-1  systemd-218-2  systemd-sysvcompat-218-2  ttf-dejavu-2.34-2  udiskie-1.1.3-1  v4l-utils-1.6.2-1
              virtualbox-guest-modules-4.3.22-1  virtualbox-guest-utils-4.3.22-2  wayland-1.7.0-1  xf86-video-intel-2.99.917-3
              xorg-server-1.17.1-2  xorg-server-common-1.17.1-2

Total Installed Size:  410.09 MiB
Net Upgrade Size:        3.39 MiB

:: Proceed with installation? [Y/n]
(29/29) checking keys in keyring                                                     [#################################################] 100%
(29/29) checking package integrity                                                   [#################################################] 100%
(29/29) loading package files                                                        [#################################################] 100%
(29/29) checking for file conflicts                                                  [#################################################] 100%
error: failed to commit transaction (conflicting files)
systemd: /var/log exists in filesystem
Errors occurred, no packages were upgraded.

When I test for pacman -Qo /var/log I get error: No package owns /var/log, yet of course /var/log exists in my filesystem since many programmes use it for their logs.

Do I simply have to --force the update and that's it or is there something wrong with the package or my installation?

I'm mostly worried since I had the same issue with the update of cups-2.0.2-1 on 11 February 2015. When listing the files of the cups package, /var/log is included there, so it can't be entirely true that pacman -Qo /var/log claims that /var/log doesn't belong to any package… Or am I getting something completly wrong here?

pacman -Ql cups | grep var
cups /var/
cups /var/cache/
cups /var/cache/cups/
cups /var/cache/cups/rss/
cups /var/log/
cups /var/log/cups/
cups /var/spool/
cups /var/spool/cups/
cups /var/spool/cups/tmp/

Best wishes, Jakob

Last edited by jakob (2015-02-22 12:32:38)

Offline

#2 2015-02-21 19:28:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] update: failed to commit transaction (conflicting files)

If /var/log didn't exist, you would get an error:

$ pacman -Qo /var/abcd
error: failed to read file '/var/abcd': No such file or directory

Have you checked your package database? Maybe it got corrupted.


Edit: Is /var/log a symlink?

Last edited by karol (2015-02-21 19:31:40)

Offline

#3 2015-02-21 20:07:41

mkoskar
Member
Registered: 2014-07-16
Posts: 63
Website

Re: [SOLVED] update: failed to commit transaction (conflicting files)

pacman -Qo /var/log
pacman -Ql | grep '/var/log/$'

Both above should get you basically same output (list of packages).
I understand that the 1) doesn't give you anything but error message.

If that is the case I would look at those packages as listed with 2) in /var/lib/pacman/.
I believe "pacman -Ql" reads "files" and probably "pacman -Qo" reads "mtree"? (or vice-versa ... see below fragment from WIKI)

That would be only explanation I can think of how those 2 commands can go out of sync (without knowing pacman internals).
Anyway I wonder how you got into such state in a first place.

See also (as described in WIKI - https://wiki.archlinux.org/index.php/Pacman):

Every installed package provides a /var/lib/pacman/local/$package-$version/files file that contains metadata about this package. If this file gets corrupted, is empty or goes missing, it results in file exists in filesystem errors when trying to update the package. Such an error usually concerns only one package. Instead of manually renaming and later removing all the files that belong to the package in question, you may exceptionally run pacman -S --force $package to force pacman to overwrite these files.


HomeBlogGitHubAUR

Offline

#4 2015-02-22 03:04:17

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: [SOLVED] update: failed to commit transaction (conflicting files)

karol wrote:

If /var/log didn't exist, you would get an error:
Edit: Is /var/log a symlink?

It actually is:

lrwxrwxrwx  1 root root    25 10. Feb 16:56 log -> /dev/shm/asd-root/var/log

I'm using anything-sync-daemon and had /var/log in my WHATTOSYNC list, therefore the symlink to /dev/shm/asd-root/var/log. As soon as I had stopped asd, the update went fine. So the problem obviously was that pacman detected that /var/log was not a directory, but a symlink… So definitely not a good idea to include /var/log in the list of files to by linked by asd. I wonder where I had taken it from originally or maybe it was my own idea but is not a terribly good one…

After re-installing all the packages listed by pacman -Ql | grep '/var/log$', the output of this and pacman -Qo /var/log are in sync again.

jakob ❯ pacman -Ql | grep '/var/log/$'
cups /var/log/
filesystem /var/log/
mopidy /var/log/
speech-dispatcher /var/log/
systemd /var/log/
teamviewer /var/log/
jakob ❯ pacman -Qo /var/log
/var/log/ is owned by cups 2.0.2-1
/var/log/ is owned by filesystem 2014.10-3
/var/log/ is owned by mopidy 0.19.5-2
/var/log/ is owned by speech-dispatcher 0.8.1-1
/var/log/ is owned by systemd 218-2
/var/log/ is owned by teamviewer 10.0.37742-1

Before, pacman -Ql | grep '/var/log/$' yielded:

cups /var/log/
filesystem /dev/shm/asd-root/var/log/
mopidy /dev/shm/asd-root/var/log/
speech-dispatcher /dev/shm/asd-root/var/log/
systemd /dev/shm/asd-root/var/log/
teamviewer /dev/shm/asd-root/var/log/

Thanks to you both, @karol and @mkoskar helping me out here!

Best, Jakob

Offline

#5 2015-02-22 14:26:22

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: [SOLVED] update: failed to commit transaction (conflicting files)

Apparetly, this problem came due to a change in pacman 4.2 which doesn't honour symlinks any more, as graysky remarked in an issue on github.

Offline

Board footer

Powered by FluxBB