Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 225821 (abssymlink) - file: pym/protage/ function: abssymlink
Summary: file: pym/protage/ function: abssymlink
Alias: abssymlink
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 459934
  Show dependency tree
Reported: 2008-06-11 01:37 UTC by zy
Modified: 2013-03-02 04:30 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description zy 2008-06-11 01:37:22 UTC
in file pym/portage/__init__py,
line 184, the function abssymlink seem not confront it's description 
the return value is not a absolute path when the symlink param is in corrent dir

I think it should use os.path.abspath() to get the result

Here is my suggestion version:
# ====================================================================
def abssymlink(symlink):
	"This reads symlinks, resolving the relative symlinks, and returning the absolute."
	if mylink[0] != '/':
            # mydir=os.path.dirname(symlink)
            mydir = "."
        # return os.path.normpath(mylink)
        return os.path.abspath(mylink)
# ====================================================================

any comment ?
Comment 1 zy 2008-06-11 07:03:31 UTC
no reply ?
maybe this info is posted in the wrong place..................
Comment 2 Zac Medico gentoo-dev 2008-06-11 07:59:55 UTC
It's in the right place. The thing is, that function is only used in one place and it's in the merge code which happens to be extremely critical. Please just give us some time to review your patch.
Comment 3 Zac Medico gentoo-dev 2013-02-15 22:35:32 UTC
I'd prefer not to change the behavior, so instead I've updated the docs:;a=commit;h=d6dd49ff7fd6308127474064bccec03b3442f9b5
Comment 4 Zac Medico gentoo-dev 2013-03-02 04:30:21 UTC
This is fixed in and 2.2.0_alpha164.