Fix stardir and repodir logic from the previous commit.
authorZac Medico <zmedico@gentoo.org>
Wed, 21 Feb 2007 10:10:15 +0000 (10:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Feb 2007 10:10:15 +0000 (10:10 -0000)
svn path=/main/trunk/; revision=6027

bin/repoman

index b8db1092f7974db10db941f63b355fb4f45354ca..c34df1b8d591b88b514c612c35445c7c711c8054 100755 (executable)
@@ -480,12 +480,10 @@ if mymode == "commit" and repolevel not in [1,2,3]:
        print red("***")
        err("Unable to identify level we're commiting from for %s" % '/'.join(reposplit))
 
-startdir = mydir
-
+startdir = normalize_path(mydir)
+repodir = startdir
 for x in range(0,repolevel-1):
-       os.chdir("..")
-repodir = mydir
-os.chdir(startdir)
+       repodir = os.path.dirname(repodir)
 
 def caterror(mycat):
        err(mycat+" is not an official category.  Skipping QA checks in this directory.\nPlease ensure that you add "+catdir+" to "+repodir+"/profiles/categories\nif it is a new category.")