From f36b76f38b54d2601cac6f22c511538e6ffe06e6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 23 May 2006 22:20:19 +0000 Subject: Fix repoman so that it works when the portage tree structure contains symlinks for bug #109961. svn path=/main/trunk/; revision=3405 --- bin/repoman | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bin') diff --git a/bin/repoman b/bin/repoman index a6bbd8fa2..83e8675fe 100755 --- a/bin/repoman +++ b/bin/repoman @@ -423,6 +423,13 @@ def have_profile_dir(path, maxdepth=3): portdir=None portdir_overlay=None mydir=os.getcwd() +if "PWD" in os.environ and os.environ["PWD"] != mydir and \ + os.path.realpath(os.environ["PWD"]) == mydir: + # getcwd() returns the canonical path but that makes it hard for repoman to + # orient itself if the user has symlinks in their portage tree structure. + # We use os.environ["PWD"], if available, to get the non-canonical path of + # the current working directory (from the shell). + mydir = os.environ["PWD"] if mydir[-1] != "/": mydir += "/" -- cgit v1.2.3-1-g7c22