Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 225821 (abssymlink) - file: pym/protage/__init__.py function: abssymlink
Summary: file: pym/protage/__init__.py function: abssymlink
Status: RESOLVED FIXED
Alias: abssymlink
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
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: ---


Attachments

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."
	mylink=os.readlink(symlink)
	if mylink[0] != '/':
            # mydir=os.path.dirname(symlink)
            mydir = "."
            mylink=mydir+"/"+mylink
        # 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:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d6dd49ff7fd6308127474064bccec03b3442f9b5
Comment 4 Zac Medico gentoo-dev 2013-03-02 04:30:21 UTC
This is fixed in 2.1.11.53 and 2.2.0_alpha164.