Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73494 - app-portage/epm - feature request: epm -qf to handle symbolic links
Summary: app-portage/epm - feature request: epm -qf to handle symbolic links
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on: 449458
Blocks:
  Show dependency tree
 
Reported: 2004-12-05 16:58 UTC by David Norris
Modified: 2013-02-01 20:55 UTC (History)
4 users (show)

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


Attachments
patch to add -L (follow symlinks) option (diff -u format) (follow-symlinks.patch,2.35 KB, patch)
2004-12-05 19:41 UTC, David Norris
Details | Diff
UPDATED patch (halves the performance penalty) (follow-symlinks-2.patch,2.60 KB, patch)
2004-12-05 20:04 UTC, David Norris
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Norris 2004-12-05 16:58:02 UTC
Suppose package P installs file F in directory S, but S is really a symbolic link to directory D. Running epm -qf D/F won't work:

   % epm -qf D/F
   file D/F is not owned by any package

It'd be neat if there was a "follow symbolic links" commandline flag. For each filename the package installed, epm could see if there are any symbolic links in that filename's path which would resolve it to the path specified on the commandline.

This would be particularly nice on amd64, since e.g. /usr/X11R6/lib64 => /usr/X11R6/lib and /usr/X11R6/lib32 => /emul/linux/x86/usr/X11R6/lib32.

Thanks for your consideration!
Comment 1 David Norris 2004-12-05 17:25:06 UTC
Aron,

I'll make a patch for this and send it to you for consideration. Thanks for the great and extremely helpful tool!
Comment 2 David Norris 2004-12-05 19:41:16 UTC
Created attachment 45352 [details, diff]
patch to add -L (follow symlinks) option (diff -u format)

Aron,

Here's a start, at least. This is one of my first patch contributions so please
bear with me as I don't really know the etiquette.

This patch adds the -L commandline flag to dereference symbolc links when
searching with -qf. It uses some GPL'd dereferencing code I found online (see
source attribution in code).

It is also rather slow, I'm afraid. But perhaps someone will find it useful.

I disclaim any copyright or IP interest in this code.

Thanks again!
Comment 3 David Norris 2004-12-05 19:42:37 UTC
Forgot to mention, the patch is against the epm-0.8.8 ebuild.
Comment 4 David Norris 2004-12-05 20:04:55 UTC
Created attachment 45354 [details, diff]
UPDATED patch (halves the performance penalty)

This version halves the performance penalty by only running dereference_links()
once on the original filename. It was foolishly in the inner search loop
before.
Comment 5 Paul Varner (RETIRED) gentoo-dev 2012-12-26 20:43:04 UTC
Reassigning to maintainer-needed since package was not being maintained by anyone in tools-portage herd.
Comment 6 Peter Weilbacher 2013-01-23 13:13:15 UTC
I'm not sure if this desirable. The epm interface was built to be very similar to rpm and in |rpm --help| (on an OpenSUSE machine) I cannot see any such -L switch.

I would also like to see a real-life example of where a package installs into a dir that's a symbolic link. I would call that a bug of that package...
Comment 7 Pacho Ramos gentoo-dev 2013-01-23 21:26:32 UTC
(In reply to comment #6)
> I'm not sure if this desirable. The epm interface was built to be very
> similar to rpm and in |rpm --help| (on an OpenSUSE machine) I cannot see any
> such -L switch.
> 
> I would also like to see a real-life example of where a package installs
> into a dir that's a symbolic link. I would call that a bug of that package...

Have you think in maintaining this via a proxy?
http://www.gentoo.org/proj/en/qa/proxy-maintainers/index.xml
Comment 8 Paul Varner (RETIRED) gentoo-dev 2013-02-01 20:55:34 UTC
This is fixed in app-portage/epm-1.40.  It automatically resolves the symlinks so the correct package is printed.