Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#66668 - [gstreamer] errors out on upgrade

Attached to Project: Arch Linux
Opened by T.J. Townsend (blakkheim) - Friday, 15 May 2020, 23:41 GMT
Last edited by Evangelos Foutras (foutrelis) - Tuesday, 14 July 2020, 22:47 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


When upgrading the gstreamer package to 1.16.2-2, the following error is produced:

:: Processing package changes...
(1/6) upgrading gstreamer [#####################################] 100%
Failed to set capabilities on file `usr/lib/gstreamer-1.0/gst-ptp-helper' (No such file or directory)
usage: setcap [-q] [-v] [-n <rootid>] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]

Note <filename> must be a regular (non-symlink) file.
error: command failed to execute correctly
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Tuesday, 14 July 2020, 22:47 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Configuration issue.
Comment by Jan de Groot (JGC) - Saturday, 16 May 2020, 00:00 GMT
The file is in the package, so it shouldn't generate this error. Do you have it in NoExtract in pacman.conf?
Comment by T.J. Townsend (blakkheim) - Saturday, 16 May 2020, 00:05 GMT
I have a completely default pacman.conf. Never touched it.

The file /usr/lib/gstreamer-1.0/gst-ptp-helper does exist after removing the package and reinstalling it, but that doesn't explain the error.
Comment by T.J. Townsend (blakkheim) - Saturday, 16 May 2020, 00:25 GMT

Noob question, but should usr be /usr there? I assumed it ran from / but the error message lacks the initial / too.
Comment by Jan de Groot (JGC) - Friday, 22 May 2020, 07:48 GMT
pacman executes tasks from the install file from /, so the install file is correct.
Do you use a wrapper for pacman?

Comment by T.J. Townsend (blakkheim) - Friday, 22 May 2020, 12:38 GMT
No wrapper, no yay or anything like that. Just "sudo pacman -Syu" as my normal user from the home directori.
Comment by T.J. Townsend (blakkheim) - Friday, 22 May 2020, 15:19 GMT
I edited the .install file to invoke "pwd" just before the failing command, then bumped the pkgrel and rebuilt. Upon upgrading to this "new" version with pacman -U, it prints "/root" before the failure happens.

For some reason pacman is running post_upgrade() from /root instead of / as it should.

Running it as root (not with sudo) prints /

So sudo is resetting the directory somehow. Any ideas?

Running "env" in post_upgrade() gives the following:

SUDO_COMMAND=/sbin/pacman -Syu
HTTP_USER_AGENT=pacman/5.2.1 (Linux x86_64) libalpm/12.0.1


So, with sudo:
PWD is /root and OLDPWD is /.

And with su -:
PWD is / and OLDPWD is /root.
Comment by T.J. Townsend (blakkheim) - Friday, 22 May 2020, 16:26 GMT
Local misconfiguration, solved. Task can be closed as not-a-bug.