Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 362643 - app-portage/portage-utils: curious qfile -o usage issues
Summary: app-portage/portage-utils: curious qfile -o usage issues
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-08 17:58 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2013-04-29 05:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-04-08 17:58:14 UTC
Hello,
I don't really understand how qfile -o is suppose to work and I don't see it documented anywhere. I think there is a bug hidden in here, somewhere.

% pwd
/etc
% qfile -o /etc/localtime
/etc/localtime
% qfile -o localtime
%
% qfile --version
portage-utils-0.3.1: compiled on Jun 30 2010

So, why does it matter if I use the FULL path or not? And what is the correct answer? Is it orphaned or not?

% find /var/db/pkg/ -name CONTENTS |xargs grep localtime|grep etc
%
Comment 1 Christoph Mende (RETIRED) gentoo-dev 2011-04-08 19:03:43 UTC
same behaviour with
portage-utils-0.5: compiled on Mar 17 2011
$Id: qfile.c,v 1.57 2011/03/02 02:41:08 vapier Exp $

This behaviour makes sense though, because when used like "qfile -o /etc/*" it lists all orphaned files.
Might need some doc updates though if it is intended that way.
Comment 2 SpanKY gentoo-dev 2011-10-12 19:48:02 UTC
yes, `qfile -o <file>` should list <file> if it is orphaned

the implicit relative path sounds like a bug, but i'd have to look deeper
Comment 3 Coacher 2011-10-18 22:05:36 UTC
Not sure if I should open a new bug report, but "qfile -o" seems to be broken for me:
Ion ~ # qfile --version
portage-utils-0.6: compiled on Oct 19 2011
$Id: qfile.c,v 1.58 2011/10/02 22:08:49 vapier Exp $
file written for Gentoo by <solar and vapier @ gentoo.org>

Ion ~ # qfile -o /usr/lib64/xorg/modules/extensions/libdri.so
/usr/lib64/xorg/modules/extensions/libdri.so

Ion ~ # equery b /usr/lib/xorg/modules/extensions/libdri.so
 * Searching for /usr/lib/xorg/modules/extensions/libdri.so ...
x11-base/xorg-server-1.10.4-r1 (/usr/lib64/opengl/xorg-x11/extensions/libdri.so)

It is also return false results when dealing with symlinks:

Ion ~ # qfile -o /usr/lib/libGL.so
/usr/lib/libGL.so

Ion ~ # ls -la /usr/lib/libGL.so
lrwxrwxrwx 1 root root 32 Окт 19 00:26 /usr/lib/libGL.so -> opengl/xorg-x11/lib/libGL.so.1.2

Ion ~ # equery b /usr/lib/libGL.so
 * Searching for /usr/lib/libGL.so ...
media-libs/mesa-7.11 (/usr/lib64/opengl/xorg-x11/lib/libGL.so.1.2)

Ion ~ # qfile -o /usr/lib64/opengl/xorg-x11/lib/libGL.so.1.2

None returned with the last command (as expected).
Comment 4 SpanKY gentoo-dev 2011-11-11 15:44:50 UTC
file a new bug
Comment 5 SpanKY gentoo-dev 2012-10-28 06:47:06 UTC
(In reply to comment #0)

the qfile(1) man page covers how the orphans option works

(In reply to comment #2)

yes, relative paths are broken.  "localtime" ends up matching the basename of "/usr/share/zoneinfo/localtime" which is installed by timezone-data.