Commit Graph

57 Commits

Author SHA1 Message Date
Richard Purdie 4cd9671078 bitbake: Update users of getVar/setVar to use the data store functions directly
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-27 10:35:30 +00:00
Christopher Larson d2c925f8a9 fetch.git: fix a remnant wrt persist + keyerror
(Bitbake rev: 7492233f5249d348024bc3daa113a96b765f94db)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:16:13 +01:00
Chris Larson 754d1c6983 persist_data: implement comparison, same as dict
(Bitbake rev: 1190406c526c7bb7cf415867be83e0403812a7dd)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:05:11 +01:00
Chris Larson 7fc020aa15 persist_data: raise KeyError on missing elements
(Bitbake rev: a4f62433845c29f98c6a9746d5d2847bf9506ea5)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:49:17 +01:00
Khem Raj 54e10127c4 fetch, fetch2: Get rid of DeprecationWarning notice
* This patch fixes a cosmetic issue currently we get with master

WARNING: /home/kraj/work/bitbake/lib/bb/fetch2/__init__.py:733:
DeprecationWarning: Call to deprecated function bb.mkdirhier: Please use bb.utils.mkdirhier instead.  bb.mkdirhier("%s/%s" % (rootdir, destdir))

(Bitbake rev: 36fe59ce314c295d239b76de34c8714def2c32d5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-03 22:51:33 +00:00
Richard Purdie 6b212ad3c3 bitbake/fetch/git: Add backwards compatibility code for branch name handling
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10 14:27:30 +00:00
Andreas Oberritter bd34e7d6df fetchers: Add parameter scmdata=keep to include .git/ and others in generated tarballs.
* Allows generating version information from SCMs during build.
* Note that tar doesn't need to use --exclude '.git', because
  git checkout-index doesn't clone the repository.

(Bitbake rev: 05cbc1d1a01c667c77688f36fbc5b61c5f452a3a)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:51 +00:00
Bernhard Reutner-Fischer d0d67a9fe2 fetch: rename suppports_srcrev to supports_srcrev
osc had it already spelled correctly?!

(Bitbake rev: b8bb4433de7a981c6826173e926ca34705c4ac70)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:41 +00:00
Khem Raj 6491ed9e2e fetchers: Use tar --exclude pattern to remove SCM files
This option will exclude the SCM metadata from tar files.

Tested with gcc where svn tar which used to be 156M for gcc 4.5
is now 77M

(Bitbake rev: f264cb6d43472525ad787b0887764ea696ec52ba)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:37 +00:00
Chris Larson ecc68fa4fb Switch bitbake internals to use logging directly rather than bb.msg
We use a custom Logger subclass for our loggers

This logger provides:
- 'debug' method which accepts a debug level
- 'plain' method which bypasses log formatting
- 'verbose' method which is more detail than info, but less than debug

(Bitbake rev: 3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:33 +00:00
Richard Purdie 08cec50330 bitbake/fetch/git: Ensure fullclone repositories are fully fetched
The git fetcher was failing to pull in new branches into a git
repository mirror tarball as the git fetch command being used didn't
add new remote branches.

This patch uses "git fetch --all" for fullclones to ensure any
new remote branches are cloned correctly.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-19 17:17:41 +01:00
Richard Purdie 05c8ee60f1 bitbake/fetcher: Deal with a ton of different bugs
The more we try and patch up the fetcher code, the more things break. The
code blocks in question are practically unreadable and are full of corner
cases where fetching could fail. In summary the issues noticed included:

a) Always fetching strange broken urls from the premirror for "noclone"
   git repositories
b) Not creating or rewriting .md5 stamp files inconsistently
c) Always fetching git source mirror tarballs from the premirror even
   if they already exist but the checkout directory does now
d) Passing "None" values to os.access() and os.path.extsts() checks under
   certain circumstances
e) Not using fetched git mirror tarballs if the preexist and always
   try and fetch them.

This patch rewrites the sections of code in question to be simpler and
more readable, fixing the above problems and most likely other odd
corner cases.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-19 12:47:45 +01:00
Richard Purdie 1077021f70 bitbake/fetch/git.py: Fix git fetcher to correctly use mirror tarballs
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-19 00:19:34 +01:00
Joshua Lock 04b8511614 bitbake/fetch/git: fix try_premirror() definition .Method takes 4 parameters.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-09-08 15:14:07 +01:00
Joshua Lock 7117a4458b bitbake/fetch: add try_premirror method and special case git fetcher
Add a new method, try_premirror, to the Fetch object which checks to see
whether the file needs to be fetched from a premirror.
Override this in the Git fetcher to only require a pre-mirror fetch when the
clone directory does not exist.

Fixes [BUGID 290]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-09-08 14:25:24 +01:00
Joshua Lock 5c229f921f bitbake/git: define a forcefetch method
The git fetcher should force a fetch if the required tag is not present in
the local clone, or if the fullclone parameter is set.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-09-01 11:14:41 +01:00
Richard Purdie f3292fa117 bitbake/git.py: Make sure different branches can have different revisions without triggering build count increases
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-13 11:35:11 +01:00
Richard Purdie a18e9b4f93 bitbake/git.py: Allow tracking of branches in SRC_URI without cloning for use with fullclone
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-13 11:35:11 +01:00
Richard Purdie 0ea4b89649 bitbake/git.py: Make sure a full clone checkout always updates
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-13 11:35:11 +01:00
Chris Larson ad543e2e41 Apply the 2to3 print function transform
(Bitbake rev: ff2e28d0d9723ccd0e9dd635447b6d889cc9f597)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson 7acc132cac Formatting cleanups
(Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson a7d5f73134 Fix ud.basecmd error introduced by the FETCHCMD_git commit
(Bitbake rev: 0bbcbe3548f39ca46c5aa3bf1a8681026e51cbf0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:58:41 +00:00
Martyn Welch 9a0da388ce Add FETCHCMD parameter for git
The Git fetcher currently hardwires the git command to "git". Allow the
path and any additional wrappers to the Git command to be provided via
FETCHCMD functionality, as with some of the other fetchers.

If FETCHCMD_git is not define in bitbake.conf, the fetcher defaults to "git".

(Bitbake rev: f3afb79ecac30d973a3c62ff6baf28d8b7388a24)

Signed-off-by: Malcolm Crossley <malcolm.crossley@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-22 14:53:26 +00:00
Joshua Lock 0737552c1d bitbake: unify mirror support and make it independant of the fetcher
This patch serves two purposes. Firstly it unifies the concept of mirrors into
PREMIRRORS and MIRRORS. PREMIRRORS are tried before the SRC_URI defined in the
recipe whereas MIRRORS are tried only if that fails.
The tarball stash was conceptually inline with a PREMIRROR only with special
handling within the wget fetcher and therefore only worked with certain
fetch types.
Secondly the patch removes the need for individual fetch implementations to
worry about mirror handling.

With this patch, the base fetch implementation will first try to use a
PREMIRROR to fetch the desired object, if this fails the native fetch method
for the object will be tried and if this fails will try to fetch a copy from
one of the MIRRORS.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-02-04 00:18:29 +00:00
Martin Jansa c69797d89c bitbake/git: remove repodir usage (from bitbake master)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-21 10:30:37 +00:00
Richard Purdie 22c29d8651 bitbake: Switch to bitbake-dev version (bitbake master upstream)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-20 18:46:02 +00:00
Richard Purdie 1183aff5e9 bitbake/git.py: Typo fix
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-11 17:20:06 +00:00
Richard Purdie b80f6d8ac4 bitbake/git.py: Add support for fullclone parameter
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-11 17:12:53 +00:00
Richard Purdie a94737f611 bitbake/git.py: Move variable init into the localpath function
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-11 17:12:53 +00:00
Richard Purdie c02e38901b git.py: Improve command failure error messages
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-11 12:48:14 +00:00
Richard Purdie b5a059ff28 fetch/__init__.py: Try and make the sortable_revision code mode readable
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:23 +00:00
Richard Purdie c2b5a61728 bitbake: Sync module import cleanups back from bitbake trunk
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:21 +00:00
Richard Purdie dbdf1c734f bitbake: Disable sortable revision for now
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-10 12:43:07 +01:00
Richard Purdie 522cffdb9e bitbake: Add PN to SRCREV keyhash in the persistent database to avoid conflicts between pacckages (from upstream bitbake)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-10 11:21:43 +01:00
Richard Purdie 1ca980646d bitbake: Sync git fetcher with changes upstream
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-05-11 22:34:07 +01:00
Richard Purdie ee1f065078 bitbake: Make sure the git remote head viewer preserves the username 2008-12-17 12:07:41 +00:00
Robert Bragg c1a12b7d20 Adds username support to the git fetcher, and exports SSH_AGENT_PID + SSH_AUTH_SOCK
The SSH_AGENT_PID + SSH_AUTH_SOCK environment variables are needed if you
are using ssh-agent to hold passwords for your ssh keys.
2008-12-03 16:21:45 +00:00
Richard Purdie 5ca566349c bitbake/utils.py: Add prunedir function to utils collection
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5065 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-08-18 07:56:04 +00:00
Richard Purdie 841b37b626 bitbake: Fix a bug where changed files weren't getting spotted and an invalid cache was being used
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4148 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-03-28 17:19:49 +00:00
Richard Purdie 6ac3680a2d bitbake: Sync with upstream 1.8 branch for git fetcher and --continue mode fix
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3761 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-02-11 20:33:43 +00:00
Richard Purdie 05c49eaac2 bitbake: Update to 1.8.10 release
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3555 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-01-20 14:58:00 +00:00
Richard Purdie 079e6825aa bitbake: sync with upstream stable branch bugfixes and enhancements
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3554 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-01-20 12:09:31 +00:00
Richard Purdie 688eca78c0 bitbake/fetchers: Sync with upstream bitbake
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3191 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-17 22:20:55 +00:00
Richard Purdie e13102cd66 bitbake: Update SRCREV fetcher code to cope better with multiple SCM packages
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3145 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-13 23:03:21 +00:00
Richard Purdie 4c76399930 bitbake: git.py - Fix weird git checkout issues by using git-fetch, not git-pull since we don't care about the index
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3102 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-08 00:06:34 +00:00
Richard Purdie e9b7bc6914 bitbake: fetcher updates - Add BB_GENERATE_MIRROR_TARBALLS option to allow disabling tarball creation to speedup git fetches, improve srcrev handling to remove some hacks and remove the need for external workarounds
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3101 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-07 23:49:55 +00:00
Richard Purdie eb7cc8a967 bitbake git.py: Always use tag param from URI if specified
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2791 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-26 08:39:57 +00:00
Richard Purdie 9a1a624518 git.py: Fix reference to tag
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2503 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-16 11:58:13 +00:00
Richard Purdie 11ce59b501 bitbake fetch/git.py: Don't use master as a tag
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2501 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-16 08:52:43 +00:00
Richard Purdie bfc70eb24e bitbake: Update along 1.8 branch
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2345 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-03 13:40:52 +00:00