Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

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!
Tasklist

FS#53282 - [namcap] Split debug packages always emit dangling-symlink errors

Attached to Project: Arch Linux
Opened by dx (dx) - Sunday, 12 March 2017, 23:42 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 24 March 2017, 12:51 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

All -debug packages have symlinks to their respective executables in usr/lib/debug/.build-id/, but those executables don't exist in the same package, only in the package they depend on. This results in dangling-symlink errors.

Using the contents of pacman-debug as an example:

usr/lib/debug/.build-id/9b/5469730b3d15d5631775a21648f0e8b55c73a2 -> ../../../../bin/pacman
usr/lib/debug/.build-id/9b/5469730b3d15d5631775a21648f0e8b55c73a2.debug -> ../../usr/bin/pacman.debug
usr/lib/debug/usr/bin/pacman.debug

Resulting namcap errors:

pacman-debug E: Symlink (usr/lib/debug/.build-id/9b/5469730b3d15d5631775a21648f0e8b55c73a2) points to non-existing ../../../../bin/pacman
...
pacman-debug W: Dependency included and not needed ('pacman')

This is a more specific case of  FS#45885 . I believe this one is easier to fix, while also affecting many packages. One could just detect debug packages and avoid checking them with namcap at all, or ignore all missing symlink errors inside usr/lib/debug.

The attached patch is one way to fix the issue - matching on ^usr/lib/debug/\.build-id/[0-9a-f/]+$

Additional info:
* namcap 3.2.7-2
* pacman 5.0.1-4
* devtools 20170304-1

Steps to reproduce:

1. Edit /etc/makepkg.conf
2. Change OPTIONS to have both strip and debug
3. makepkg
4. namcap *-debug*.pkg.tar.xz

That's the obvious way, which could be "fixed" by just not doing it, but this also appears when building packages with extra-x86_64-build:

1. Edit /usr/share/devtools/makepkg-x86_64.conf
2. Change OPTIONS to have both strip and debug
3. extra-x86_64-build

It checks all package files unconditionally so the error is always visible.


Full namcap output of pacman:

Checking pacman-5.0.1-4-x86_64.pkg.tar.xz
pacman W: Directory (var/cache/pacman/pkg) is empty
pacman W: Directory (var/lib/pacman) is empty
pacman W: Directory (usr/share/makepkg-template) is empty
pacman W: Directory (usr/share/libalpm/hooks) is empty
pacman W: Dependency bash included but already satisfied
pacman W: Dependency glibc included but already satisfied
Checking pacman-debug-5.0.1-4-x86_64.pkg.tar.xz
pacman-debug E: Symlink (usr/lib/debug/.build-id/9b/5469730b3d15d5631775a21648f0e8b55c73a2) points to non-existing ../../../../bin/pacman
pacman-debug E: Symlink (usr/lib/debug/.build-id/87/056dd7a9c0d8d803fee3d7144f167c75dd80f3) points to non-existing ../../../../bin/pactree
pacman-debug E: Symlink (usr/lib/debug/.build-id/3e/95729363335ec658d7b338f9da4436a348d071) points to non-existing ../../../../bin/pacsort
pacman-debug E: Symlink (usr/lib/debug/.build-id/59/bab096e306dc38d4d802e60bdeab28f47cdb46) points to non-existing ../../../../bin/cleanupdelta
pacman-debug E: Symlink (usr/lib/debug/.build-id/2e/5ddea30e5fcf1c60391624e86c252bb1a563e7) points to non-existing ../../../../bin/testpkg
pacman-debug E: Symlink (usr/lib/debug/.build-id/15/cd80a9279bfdd78008d2511e3ba3e9376f5198) points to non-existing ../../../../bin/vercmp
pacman-debug E: Symlink (usr/lib/debug/.build-id/ae/c8b1382957537899a2d5033c74079cc0f652c4) points to non-existing ../../../libalpm.so.10.0.1
pacman-debug W: Dependency included and not needed ('pacman')
This task depends upon

Closed by  Doug Newgard (Scimmia)
Friday, 24 March 2017, 12:51 GMT
Reason for closing:  Fixed
Comment by Doug Newgard (Scimmia) - Wednesday, 22 March 2017, 14:46 GMT
Added keenerd to the notification list.
Comment by Kyle Keen (keenerd) - Wednesday, 22 March 2017, 15:02 GMT
I'd rather fix it the correct way. Getting a full list of all files for the (direct) dependencies is easy when they are installed, and easy for more-recent official packages.
Comment by Kyle Keen (keenerd) - Wednesday, 22 March 2017, 15:37 GMT
And fixed in commit 1a44d4e747
Comment by dx (dx) - Friday, 24 March 2017, 04:14 GMT
Nice, thanks! That is much better.

I see you left a comment about "dependency included and not needed" in the other ticket, you can close this one and handle that part of the issue over there.

Loading...