For consistency, replace multiple os.getcwd() calls with the "mydir" variable.
authorZac Medico <zmedico@gentoo.org>
Wed, 21 Feb 2007 09:30:59 +0000 (09:30 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Feb 2007 09:30:59 +0000 (09:30 -0000)
svn path=/main/trunk/; revision=6024

bin/repoman

index 7f51443d28936a3433a1f78a7c5bf74e79ed24a6..b8db1092f7974db10db941f63b355fb4f45354ca 100755 (executable)
@@ -480,11 +480,11 @@ 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=os.getcwd()
+startdir = mydir
 
 for x in range(0,repolevel-1):
        os.chdir("..")
-repodir=os.getcwd()
+repodir = mydir
 os.chdir(startdir)
 
 def caterror(mycat):
@@ -1666,7 +1666,7 @@ else:
                                del myfiles[x]
                mydone=[]
                if repolevel==3:   # In a package dir
-                       repoman_settings["O"]=os.getcwd()
+                       repoman_settings["O"] = mydir
                        portage.digestgen([], repoman_settings, manifestonly=1,
                                myportdb=portdb)
                elif repolevel==2: # In a category dir
@@ -1677,7 +1677,7 @@ else:
                                if xs[0] in mydone:
                                        continue
                                mydone.append(xs[0])
-                               repoman_settings["O"]=os.path.join(os.getcwd(), xs[0])
+                               repoman_settings["O"] = os.path.join(mydir, xs[0])
                                portage.digestgen([], repoman_settings, manifestonly=1,
                                        myportdb=portdb)
                elif repolevel==1: # repo-cvsroot