Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93843 - app-portage/epm - epm -qf issues
Summary: app-portage/epm - epm -qf issues
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Other
: High normal (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:
: 351554 (view as bug list)
Depends on: 449458
Blocks:
  Show dependency tree
 
Reported: 2005-05-24 13:02 UTC by Aron Griffis (RETIRED)
Modified: 2013-02-01 20:56 UTC (History)
2 users (show)

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


Attachments
patch (bug93843_abspath.diff,722 bytes, patch)
2013-01-23 11:49 UTC, Peter Weilbacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Griffis (RETIRED) gentoo-dev 2005-05-24 13:02:16 UTC
From an IRC conversation:

the epm -qf behavior isn't very good.  it's easily fooled and it's not as good
as rpm.  it has this big ol' chunk of code that I don't like.

        # Trim trailing slashes from directories
        $a =~ s#/*$##;
        # If it's a relative pathname, then figure out the full pathname
        if ($a !~ m#^/# || $a =~ m#/\.\./#) {
            # Make the pathname absolute
            if ($a =~ s#/([^/]+)$##) {
                my $name = $1;
                $a = abs_path($a) . '/' . $name;
            }
            else {
                $a = abs_path('.') . '/' . $a;
            }
        }

that whole thing could be replaced with:

    $a = abs_path($a) || $a;

but that's not good enough because it's still not as good as rpm.  rpm is much
better at "abs_path" than epm is.  oh, and btw, the || $a bit is because if
abs_path can't deal with what you passed in, it passes back undef.  and that's
really the case I'm focusing on because it annoys me the most: when a file is
gone, epm might not be able to tell you which package used to own it.  rpm works
really well in this case:

    rpm -qf ../../../usr/info/../info/cssc.info
    CSSC-0.11alpha.pl2-1
Comment 1 michael@smith-li.com 2010-11-07 16:23:19 UTC
Suggestion:

Could the summary of this bug be, "app-portage/epm unable to tell owner of missing file" or something more informative than its current summary?
Comment 2 Paul Varner (RETIRED) gentoo-dev 2012-12-26 20:43:05 UTC
Reassigning to maintainer-needed since package was not being maintained by anyone in tools-portage herd.
Comment 3 Peter Weilbacher 2013-01-23 11:45:33 UTC
I don't get what exactly this bug is about. Getting relative paths, even for files that were gone, works perfectly:

$ sudo mv -v /usr/share/man/man1/epm.1.bz2 /usr/share/man/man1/epm__.1.bz2
‘/usr/share/man/man1/epm.1.bz2’ -> ‘/usr/share/man/man1/epm__.1.bz2’
$ epm -qf ../../../../usr/share/man/../man/man1/epm.1.bz2 
epm-1.33
Comment 4 Peter Weilbacher 2013-01-23 11:49:55 UTC
Created attachment 336576 [details, diff]
patch

Aron was probably right that only working with absolute paths is easier. Here's the patch he drew up in comment 0.
Comment 5 Sergey Popov gentoo-dev 2013-01-23 11:58:40 UTC
*** Bug 351554 has been marked as a duplicate of this bug. ***
Comment 6 Paul Varner (RETIRED) gentoo-dev 2013-02-01 20:56:13 UTC
This is fixed in app-portage/epm-1.40