Summary: | app-portage/gentoolkit-0.2.4.6.1-r1: `equery belongs' does not correctly follow symbolic links when looking for files that belongs to a package | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alex Buell <alex.buell> |
Component: | New packages | Assignee: | Portage Tools Team <tools-portage> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | vikraman |
Priority: | Normal | ||
Version: | 10.1 | ||
Hardware: | Sparc | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
better-symlink-resolution
better-symlink-resolution |
Description
Alex Buell
2011-03-30 09:56:21 UTC
% l /lib/libc.so.6 lrwxrwxrwx 1 root root 14 Mar 12 10:01 /lib/libc.so.6 -> libc-2.11.2.so* % equery belongs /lib/libc.so.6; equery belongs /lib/libc-2.11.2.so * Searching for /lib/libc.so.6 ... sys-libs/glibc-2.11.2-r2 (/lib64/libc-2.11.2.so) * Searching for /lib/libc-2.11.2.so ... % equery belongs /lib64/libc.so.6; equery belongs /lib64/libc-2.11.2.so * Searching for /lib64/libc.so.6 ... sys-libs/glibc-2.11.2-r2 (/lib64/libc.so.6 -> libc-2.11.2.so) sys-libs/glibc-2.11.2-r2 (/lib64/libc-2.11.2.so) * Searching for /lib64/libc-2.11.2.so ... sys-libs/glibc-2.11.2-r2 (/lib64/libc-2.11.2.so) % qfile /lib/libc.so.6; qfile /lib/libc-2.11.2.so sys-libs/glibc (/lib64/libc.so.6) sys-libs/glibc (/lib64/libc-2.11.2.so) % qfile /lib64/libc.so.6; qfile /lib64/libc-2.11.2.so sys-libs/glibc (/lib64/libc.so.6) sys-libs/glibc (/lib64/libc-2.11.2.so) I forgot to add that this was on SPARC. Which architecture is yours, Vikraman? (In reply to comment #2) > I forgot to add that this was on SPARC. Which architecture is yours, Vikraman? AMD64 Created attachment 267923 [details, diff]
better-symlink-resolution
I think I figured it out, equery resolves symlinks only at the lowest level, ie, /lib/libc-2.11.2.so is not resolved to /lib64/libc-2.11.2.so, since libc-2.11.2.so is not a symlink. It must have slipped the mind of the authors. Here's a very simple patch to fix it (os.path.realpath already does that).
My app-portage/gentoolkit version is 0.3.0_rc11-r3, and IMO this would affect all architectures. *** This bug has been marked as a duplicate of bug 96515 *** Created attachment 268037 [details, diff]
better-symlink-resolution
|