summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-06-10 08:56:40 +0000
committerRichard Purdie <richard@openedhand.com>2006-06-10 08:56:40 +0000
commitbc8ad1b1cda0dd21b5b0b816b386b0bf96d5891a (patch)
treeaff958d279429942895c02807bf5da84d77cf5c7 /bitbake/lib
parent65cef0da326e839871f21f638bdfc7fda17e4654 (diff)
downloadpoky-bc8ad1b1cda0dd21b5b0b816b386b0bf96d5891a.tar.gz
bitbake: Update against upstream stable branch (includes srcdate='now' support)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@458 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py22
-rw-r--r--bitbake/lib/bb/fetch/cvs.py8
-rw-r--r--bitbake/lib/bb/fetch/svk.py4
-rw-r--r--bitbake/lib/bb/fetch/svn.py11
4 files changed, 28 insertions, 17 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index ac698a0d1c..a2defd25a5 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -185,6 +185,28 @@ class Fetch(object):
185 return False 185 return False
186 try_mirror = staticmethod(try_mirror) 186 try_mirror = staticmethod(try_mirror)
187 187
188 def check_for_tarball(d, tarfn, dldir, date):
189 """
190 Check for a local copy then check the tarball stash.
191 Both checks are skipped if date == 'now'.
192
193 d Is a bb.data instance
194 tarfn is the name of the tarball
195 date is the SRCDATE
196 """
197 if "now" != date:
198 dl = os.path.join(dldir, tarfn)
199 if os.access(dl, os.R_OK):
200 bb.debug(1, "%s already exists, skipping checkout." % tarfn)
201 return True
202
203 # try to use the tarball stash
204 if Fetch.try_mirror(d, tarfn):
205 return True
206 return False
207 check_for_tarball = staticmethod(check_for_tarball)
208
209
188import cvs 210import cvs
189import git 211import git
190import local 212import local
diff --git a/bitbake/lib/bb/fetch/cvs.py b/bitbake/lib/bb/fetch/cvs.py
index 10ec700dc9..0b2477560a 100644
--- a/bitbake/lib/bb/fetch/cvs.py
+++ b/bitbake/lib/bb/fetch/cvs.py
@@ -128,13 +128,7 @@ class Cvs(Fetch):
128 data.setVar('TARFILES', dlfile, localdata) 128 data.setVar('TARFILES', dlfile, localdata)
129 data.setVar('TARFN', tarfn, localdata) 129 data.setVar('TARFN', tarfn, localdata)
130 130
131 dl = os.path.join(dldir, tarfn) 131 if Fetch.check_for_tarball(d, tarfn, dldir, date):
132 if os.access(dl, os.R_OK):
133 bb.debug(1, "%s already exists, skipping cvs checkout." % tarfn)
134 continue
135
136 # try to use the tarball stash
137 if Fetch.try_mirror(d, tarfn):
138 continue 132 continue
139 133
140 if date: 134 if date:
diff --git a/bitbake/lib/bb/fetch/svk.py b/bitbake/lib/bb/fetch/svk.py
index c0819da3dc..19103213cd 100644
--- a/bitbake/lib/bb/fetch/svk.py
+++ b/bitbake/lib/bb/fetch/svk.py
@@ -101,9 +101,7 @@ class Svk(Fetch):
101 data.setVar('TARFILES', dlfile, localdata) 101 data.setVar('TARFILES', dlfile, localdata)
102 data.setVar('TARFN', tarfn, localdata) 102 data.setVar('TARFN', tarfn, localdata)
103 103
104 dl = os.path.join(dldir, tarfn) 104 if Fetch.check_for_tarball(d, tarfn, dldir, date):
105 if os.access(dl, os.R_OK):
106 bb.debug(1, "%s already exists, skipping svk checkout." % tarfn)
107 continue 105 continue
108 106
109 olddir = os.path.abspath(os.getcwd()) 107 olddir = os.path.abspath(os.getcwd())
diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py
index 6e3a9277ab..d1a959371b 100644
--- a/bitbake/lib/bb/fetch/svn.py
+++ b/bitbake/lib/bb/fetch/svn.py
@@ -111,13 +111,7 @@ class Svn(Fetch):
111 data.setVar('TARFILES', dlfile, localdata) 111 data.setVar('TARFILES', dlfile, localdata)
112 data.setVar('TARFN', tarfn, localdata) 112 data.setVar('TARFN', tarfn, localdata)
113 113
114 dl = os.path.join(dldir, tarfn) 114 if Fetch.check_for_tarball(d, tarfn, dldir, date):
115 if os.access(dl, os.R_OK):
116 bb.debug(1, "%s already exists, skipping svn checkout." % tarfn)
117 continue
118
119 # try to use the tarball stash
120 if Fetch.try_mirror(d, tarfn):
121 continue 115 continue
122 116
123 olddir = os.path.abspath(os.getcwd()) 117 olddir = os.path.abspath(os.getcwd())
@@ -133,6 +127,9 @@ class Svn(Fetch):
133 127
134 if revision: 128 if revision:
135 svncmd = "svn co -r %s %s://%s/%s" % (revision, proto, svnroot, module) 129 svncmd = "svn co -r %s %s://%s/%s" % (revision, proto, svnroot, module)
130 elif date == "now":
131 svncmd = "svn co %s://%s/%s" % (proto, svnroot, module)
132
136 if svn_rsh: 133 if svn_rsh:
137 svncmd = "svn_RSH=\"%s\" %s" % (svn_rsh, svncmd) 134 svncmd = "svn_RSH=\"%s\" %s" % (svn_rsh, svncmd)
138 135