summaryrefslogtreecommitdiffstats
path: root/bitbake
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
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')
-rwxr-xr-xbitbake/bin/bitbake16
-rw-r--r--bitbake/doc/manual/usermanual.xml8
-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
6 files changed, 44 insertions, 25 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 10cf4bd00a..7fbe7ed5eb 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -781,11 +781,19 @@ class BBCooker:
781 try: 781 try:
782 self.configuration.data = bb.parse.handle( afile, self.configuration.data ) 782 self.configuration.data = bb.parse.handle( afile, self.configuration.data )
783 783
784 # Add the handlers we inherited by INHERITS 784 # Add the handlers we inherited by INHERIT
785 # we need to do this manually as it is not guranteed
786 # we will pick up these classes... as we only INHERIT
787 # on .inc and .bb files but not on .conf
788 data = bb.data.createCopy( self.configuration.data )
789 inherits = ["base"] + (bb.data.getVar('INHERIT', data, True ) or "").split()
790 for inherit in inherits:
791 data = bb.parse.handle( os.path.join('classes', '%s.bbclass' % inherit ), data, True )
792
785 # FIXME: This assumes that we included at least one .inc file 793 # FIXME: This assumes that we included at least one .inc file
786 for var in bb.data.keys(self.configuration.data): 794 for var in bb.data.keys(data):
787 if bb.data.getVarFlag(var, 'handler', self.configuration.data): 795 if bb.data.getVarFlag(var, 'handler', data):
788 bb.event.register(var,bb.data.getVar(var,self.configuration.data)) 796 bb.event.register(var,bb.data.getVar(var, data))
789 797
790 except IOError: 798 except IOError:
791 bb.fatal( "Unable to open %s" % afile ) 799 bb.fatal( "Unable to open %s" % afile )
diff --git a/bitbake/doc/manual/usermanual.xml b/bitbake/doc/manual/usermanual.xml
index 33150b10f2..c314236c6f 100644
--- a/bitbake/doc/manual/usermanual.xml
+++ b/bitbake/doc/manual/usermanual.xml
@@ -250,9 +250,9 @@ a per URI parameters separated by a <quote>;</quote> consisting of a key and a v
250 250
251 <section> 251 <section>
252 <title>CVS File Fetcher</title> 252 <title>CVS File Fetcher</title>
253 <para>The URN for the CVS Fetcher is <emphasis>cvs</emphasis>. This Fetcher honors the variables <varname>DL_DIR</varname>, <varname>SRCDATE</varname>, <varname>FETCHCOMMAND_cvs</varname>, <varname>UPDATECOMMAND_cvs</varname>. <varname>DL_DIRS</varname> specifies where a temporary checkout is saved, <varname>SRCDATE</varname> specifies which date to use when doing the fetching, <varname>FETCHCOMMAND</varname> and <varname>UPDATECOMMAND</varname> specify which executables should be used when doing the CVS checkout or update. 253 <para>The URN for the CVS Fetcher is <emphasis>cvs</emphasis>. This Fetcher honors the variables <varname>DL_DIR</varname>, <varname>SRCDATE</varname>, <varname>FETCHCOMMAND_cvs</varname>, <varname>UPDATECOMMAND_cvs</varname>. <varname>DL_DIRS</varname> specifies where a temporary checkout is saved, <varname>SRCDATE</varname> specifies which date to use when doing the fetching (the special value of "now" will cause the checkout to be updated on every build), <varname>FETCHCOMMAND</varname> and <varname>UPDATECOMMAND</varname> specify which executables should be used when doing the CVS checkout or update.
254 </para> 254 </para>
255 <para>The supported Parameters are <varname>module</varname>, <varname>tag</varname>, <varname>date</varname>, <varname>method</varname>, <varname>localdir</varname>, <varname>rsh</varname>. The <varname>module</varname> specifies which module to check out, the <varname>tag</varname> describes which CVS TAG should be used for the checkout by default the TAG is empty. A <varname>date</varname> can be specified to override the SRCDATE of the configuration to checkout a specific date. <varname>method</varname> is by default <emphasis>pserver</emphasis>, if <emphasis>ext</emphasis> is used the <varname>rsh</varname> parameter will be evaluated and <varname>CVS_RSH</varname> will be set. Finally <varname>localdir</varname> is used to checkout into a special directory relative to <varname>CVSDIR></varname>. 255 <para>The supported Parameters are <varname>module</varname>, <varname>tag</varname>, <varname>date</varname>, <varname>method</varname>, <varname>localdir</varname>, <varname>rsh</varname>. The <varname>module</varname> specifies which module to check out, the <varname>tag</varname> describes which CVS TAG should be used for the checkout by default the TAG is empty. A <varname>date</varname> can be specified to override the SRCDATE of the configuration to checkout a specific date. The special value of "now" will cause the checkout to be updated on every build.<varname>method</varname> is by default <emphasis>pserver</emphasis>, if <emphasis>ext</emphasis> is used the <varname>rsh</varname> parameter will be evaluated and <varname>CVS_RSH</varname> will be set. Finally <varname>localdir</varname> is used to checkout into a special directory relative to <varname>CVSDIR></varname>.
256<screen><varname>SRC_URI</varname> = "cvs://CVSROOT;module=mymodule;tag=some-version;method=ext" 256<screen><varname>SRC_URI</varname> = "cvs://CVSROOT;module=mymodule;tag=some-version;method=ext"
257<varname>SRC_URI</varname> = "cvs://CVSROOT;module=mymodule;date=20060126;localdir=usethat" 257<varname>SRC_URI</varname> = "cvs://CVSROOT;module=mymodule;date=20060126;localdir=usethat"
258</screen> 258</screen>
@@ -275,7 +275,7 @@ will be tried first when fetching a file if that fails the actual file will be t
275 <section> 275 <section>
276 <title>SVK Fetcher</title> 276 <title>SVK Fetcher</title>
277 <para> 277 <para>
278 <emphasis>Currently NOT suppoered</emphasis> 278 <emphasis>Currently NOT supported</emphasis>
279 </para> 279 </para>
280 </section> 280 </section>
281 281
@@ -283,7 +283,7 @@ will be tried first when fetching a file if that fails the actual file will be t
283 <title>SVN Fetcher</title> 283 <title>SVN Fetcher</title>
284 <para>The URN for the SVN Fetcher is <emphasis>svn</emphasis>. 284 <para>The URN for the SVN Fetcher is <emphasis>svn</emphasis>.
285 </para> 285 </para>
286 <para>The Variables <varname>FETCHCOMMAND_svn</varname>, <varname>DL_DIR</varname> are used by the SVN Fetcher. <varname>FETCHCOMMAND</varname> contains the subversion command, <varname>DL_DIR</varname> is the directory where tarballs will be saved. 286 <para>This Fetcher honors the variables <varname>FETCHCOMMAND_svn</varname>, <varname>DL_DIR</varname>, <varname>SRCDATE</varname>. <varname>FETCHCOMMAND</varname> contains the subversion command, <varname>DL_DIR</varname> is the directory where tarballs will be saved, <varname>SRCDATE</varname> specifies which date to use when doing the fetching (the special value of "now" will cause the checkout to be updated on every build).
287 </para> 287 </para>
288 <para>The supported Parameters are <varname>proto</varname>, <varname>rev</varname>. <varname>proto</varname> is the subversion prototype, <varname>rev</varname> is the subversions revision. 288 <para>The supported Parameters are <varname>proto</varname>, <varname>rev</varname>. <varname>proto</varname> is the subversion prototype, <varname>rev</varname> is the subversions revision.
289 </para> 289 </para>
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