lib/bb/fetch/cvs.py:
authorRichard Purdie <rpurdie@linux.intel.com>
Sat, 29 Apr 2006 10:25:13 +0000 (10:25 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Sat, 29 Apr 2006 10:25:13 +0000 (10:25 +0000)
lib/bb/fetch/__init__.py:
lib/bb/fetch/svn.py:
- Move the DL_DIR check into try_mirror since every fetcher will do this.
  (git fetcher already assumes this check is made)

lib/bb/fetch/__init__.py
lib/bb/fetch/cvs.py
lib/bb/fetch/svn.py

index ac698a0..0515f2a 100644 (file)
@@ -168,6 +168,10 @@ class Fetch(object):
         d Is a bb.data instance
         tarfn is the name of the tarball
         """
+        tarpath = os.path.join(data.getVar("DL_DIR", d, 1), tarfn)
+        if os.access(tarpath, os.R_OK):
+            return True
+
         pn = data.getVar('PN', d, True)
         src_tarball_stash = None
         if pn:
index 10ec700..b2a65de 100644 (file)
@@ -128,13 +128,9 @@ class Cvs(Fetch):
             data.setVar('TARFILES', dlfile, localdata)
             data.setVar('TARFN', tarfn, localdata)
 
-            dl = os.path.join(dldir, tarfn)
-            if os.access(dl, os.R_OK):
-                bb.debug(1, "%s already exists, skipping cvs checkout." % tarfn)
-                continue
-
             # try to use the tarball stash
             if Fetch.try_mirror(d, tarfn):
+                bb.debug(1, "%s already exists or was mirrored, skipping cvs checkout." % tarfn)
                 continue
 
             if date:
index 6e3a927..ee57ea6 100644 (file)
@@ -111,13 +111,9 @@ class Svn(Fetch):
             data.setVar('TARFILES', dlfile, localdata)
             data.setVar('TARFN', tarfn, localdata)
 
-            dl = os.path.join(dldir, tarfn)
-            if os.access(dl, os.R_OK):
-                bb.debug(1, "%s already exists, skipping svn checkout." % tarfn)
-                continue
-
             # try to use the tarball stash
             if Fetch.try_mirror(d, tarfn):
+                bb.debug(1, "%s already exists or was mirrored, skipping svn checkout." % tarfn)
                 continue
 
             olddir = os.path.abspath(os.getcwd())