Add 'localdir' parameter to the cvs fetcher, specifically for binutils cvs, for whom
authorChris Larson <clarson@kergoth.com>
Thu, 5 Aug 2004 00:24:02 +0000 (00:24 +0000)
committerChris Larson <clarson@kergoth.com>
Thu, 5 Aug 2004 00:24:02 +0000 (00:24 +0000)
the 'binutils' module creates a local 'src' directory.

bin/oe/fetch.py

index ade343a..5e5a3d6 100644 (file)
@@ -322,6 +322,11 @@ class Cvs(Fetch):
             else:
                 method = "pserver"
 
+            if "localdir" in parm:
+                localdir = parm["localdir"]
+            else:
+                localdir = os.path.basename(module)
+
             cvs_rsh = None
             if method == "ext":
                 if "rsh" in parm:
@@ -398,7 +403,7 @@ class Cvs(Fetch):
 
             os.chdir(os.path.join(tmpfile, os.path.dirname(module)))
 #           tar them up to a defined filename
-            myret = os.system("tar -czvf %s %s" % (os.path.join(dldir,tarfn), os.path.basename(module)))
+            myret = os.system("tar -czvf %s %s" % (os.path.join(dldir,tarfn), localdir))
             if myret != 0:
                 try:
                     os.unlink(tarfn)