From abf40a78476164665c0b4d9f19414f7d716a7c5c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 5 Jan 2007 01:26:58 +0000 Subject: Make repoman use portage.normalize_path instead of os.path.normpath. This might solve an issue with incorrect repolevel detection that was reported by drizzt. svn path=/main/trunk/; revision=5463 --- bin/repoman | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/repoman b/bin/repoman index f3fb731d4..b274af510 100755 --- a/bin/repoman +++ b/bin/repoman @@ -395,6 +395,7 @@ if mymode == "commit": while "--ignore-masked" in myoptions: myoptions.remove("--ignore-masked") +from portage import normalize_path isCvs=False myreporoot=None if os.path.isdir("CVS"): @@ -409,8 +410,8 @@ if not "--pretend" in myoptions and not isCvs: def have_profile_dir(path, maxdepth=3): while path != "/" and maxdepth: if os.path.exists(path + "/profiles/package.mask"): - return path - path = os.path.normpath(path + "/..") + return normalize_path(path) + path = normalize_path(path + "/..") maxdepth -= 1 portdir=None @@ -422,7 +423,8 @@ if "PWD" in os.environ and os.environ["PWD"] != mydir and \ # 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.path.normpath(os.environ["PWD"]) + mydir = os.environ["PWD"] +mydir = normalize_path(mydir) if mydir[-1] != "/": mydir += "/" @@ -453,10 +455,8 @@ if not portdir_overlay: if not portdir: portdir = repoman_settings["PORTDIR"] -if portdir[-1] == "/": - portdir = portdir[:-1] -if portdir_overlay[-1] == "/": - portdir_overlay = portdir_overlay[:-1] +portdir = normalize_path(portdir) +portdir_overlay = normalize_path(portdir_overlay) os.environ["PORTDIR"] = portdir if portdir_overlay != portdir: -- cgit v1.2.3-1-g7c22