1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

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
This commit is contained in:
Richard Purdie
2006-06-10 08:56:40 +00:00
parent 65cef0da32
commit bc8ad1b1cd
6 changed files with 44 additions and 25 deletions
+22
View File
@@ -185,6 +185,28 @@ class Fetch(object):
return False
try_mirror = staticmethod(try_mirror)
def check_for_tarball(d, tarfn, dldir, date):
"""
Check for a local copy then check the tarball stash.
Both checks are skipped if date == 'now'.
d Is a bb.data instance
tarfn is the name of the tarball
date is the SRCDATE
"""
if "now" != date:
dl = os.path.join(dldir, tarfn)
if os.access(dl, os.R_OK):
bb.debug(1, "%s already exists, skipping checkout." % tarfn)
return True
# try to use the tarball stash
if Fetch.try_mirror(d, tarfn):
return True
return False
check_for_tarball = staticmethod(check_for_tarball)
import cvs
import git
import local
+1 -7
View File
@@ -128,13 +128,7 @@ 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):
if Fetch.check_for_tarball(d, tarfn, dldir, date):
continue
if date:
+1 -3
View File
@@ -101,9 +101,7 @@ class Svk(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 svk checkout." % tarfn)
if Fetch.check_for_tarball(d, tarfn, dldir, date):
continue
olddir = os.path.abspath(os.getcwd())
+4 -7
View File
@@ -111,13 +111,7 @@ 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):
if Fetch.check_for_tarball(d, tarfn, dldir, date):
continue
olddir = os.path.abspath(os.getcwd())
@@ -133,6 +127,9 @@ class Svn(Fetch):
if revision:
svncmd = "svn co -r %s %s://%s/%s" % (revision, proto, svnroot, module)
elif date == "now":
svncmd = "svn co %s://%s/%s" % (proto, svnroot, module)
if svn_rsh:
svncmd = "svn_RSH=\"%s\" %s" % (svn_rsh, svncmd)