summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-05 01:26:58 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-05 01:26:58 +0000
commitabf40a78476164665c0b4d9f19414f7d716a7c5c (patch)
tree60048416485cb164a8d88d636034153f7d888e5a /bin/repoman
parentUse -G instead of -g (typo from the previous commit). (diff)
downloadportage-multirepo-abf40a78476164665c0b4d9f19414f7d716a7c5c.tar.gz
portage-multirepo-abf40a78476164665c0b4d9f19414f7d716a7c5c.tar.bz2
portage-multirepo-abf40a78476164665c0b4d9f19414f7d716a7c5c.zip
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
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/repoman b/bin/repoman
index f3fb731d..b274af51 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: