summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Formatting cleanupsChris Larson2010-07-021-16/+16
| | | | | | | (Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Stop using functions via 'bb' that were moved from there to other modulesChris Larson2010-07-021-5/+5
| | | | | | | (Bitbake rev: 03a6c26f8da226f442c3cab557e4733f7cd6eeac) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop doctest, as we aren't utilizing itChris Larson2010-07-021-33/+0
| | | | | | | | | | | We should add back in some proper unit testing. Doctest is rather limited, and we haven't actually made use of it since the original implementation of the datastore when the project started, as far as I'm aware. (Bitbake rev: 3a11c2807972bbbddffde2fa67fc380d159da467) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake decodeurl: fix the file:// url handlingNitin A Kamble2010-06-071-1/+4
| | | | | | | | | | | Without this patch decoding a url of this kind file://dir/filename gives path=/filename host=dir. With the patch it decodes as path=/dir/filename host="" Probably nobody stumbled on this issue yet because nobody used file:// urls with directory names in the path. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* Fix 7 references to undefined variables, as spotted by pyflakesChris Larson2010-03-251-2/+2
| | | | | | | (Bitbake rev: e1e4ccf203e38070eeafd31a622671996cff61a1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Expand PREMIRRORSEnrico Scholz2010-03-251-1/+1
| | | | | | | | | | | | When not expanding PREMIRRORS, the functions fails/does not work correctly when PREMIRRORS is not a plain string (e.g. contains ${...} or a ${@...} statements). (Bitbake rev: d612d22b073f68b8cf1bb7344e0487820040d80d) Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Avoid unnecessary calls to keys() when iterating over dictionaries.Chris Larson2010-03-221-2/+2
| | | | | | | | | | | | | | | | | | dict objects provide an __iter__ method for the iteration which gives you the keys, so calling keys directly is unnecessary, and isn't really a best practice. The only time you really need to call the keys is if there's a danger of the dict changing out from underneith you, either due to external forces or due to modification of the iterable in the loop. Iterations over os.environ are apparently subject to such changes, so they must continue to use keys(). As an aside, also switches a couple spots to using sorted() rather than creating a temporary list with keys() and sorting that. (Bitbake rev: 5b6ccb16c6e71e23dac6920cd2df994d67c2587b) Signed-off-by: Chris Larson <clarson@mvista.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add initial 'repo' fetcherTom Rini2010-03-221-0/+2
| | | | | | | | (Bitbake rev: f68406e864c9837feb56cbec993b620481445cc2) Signed-off-by: Tom Rini <tom_rini@mentor.com> Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Move encodeurl, decodeurl into bb.fetch.Chris Larson2010-03-221-0/+94
| | | | | | | (Bitbake rev: 867d36f9afce2d298874ac7563e5b3852ef04659) Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Move MalformedUrl, VarExpandError into appropriate modules.Chris Larson2010-03-221-0/+3
| | | | | | | (Bitbake rev: e616483b237dafff7f90ba1c09e9ee7c383a2e47) Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake fetch/__init__.py: Failing urls should raise errors, not fatal ↵Richard Purdie2010-03-151-1/+1
| | | | | | exceptions Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: fix invalid method and logicJoshua Lock2010-02-051-3/+3
| | | | | | The previous bitbake change included an invalid method call and inverted logic. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: Test premirrors and mirrors in checkstatus()Joshua Lock2010-02-051-4/+18
| | | | | | | | | | | | checkstatus() is used to ensure we can fetch a copy of each file, so it makes sense to also test PREMIRRORS and MIRRORS in the method. This patch adds calls to try_mirrors() to the Fetch.checkstatus() method and changes the try_mirrors() method to take a check argument, which is False by default. When check is True try_mirrors() will call a fetchers checkstatus() with the replaced uri. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: Fix try_mirrors() logic, was only trying the first mirror.Joshua Lock2010-02-041-1/+2
| | | | | | | | | The logic in try_mirrors() was buggy such that only the first entry in the mirrors list was tried. This patch fixes this. Thanks to Richard for the review. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: if PREMIRRORS set test for local file in FetchData.setup_localpathJoshua Lock2010-02-041-8/+22
| | | | | | | | | | When we are using PREMIRRORS it's possible a mirror in the local namespace (some filesystem path, i.e. an NFS share) provides read-only files. This is a perfectly valid scenario so this patch fixes bitbake so that for such a scenario locapath is set to the files path rather than some child of DL_DIR. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: Enhance the fetchers' support for local mirrorsJoshua Lock2010-02-041-7/+15
| | | | | | | | | | Modify the try_mirrors() function to return the localpath of the fetched file and update the data dictionary to reflect this. Secondly the metadata files, lock and md5, should always be stored relative to the ${DL_DIR} as it is possible that the localpath is a read-only directory, for example in the scenario where there is a read-only file:// mirror. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: unify mirror support and make it independant of the fetcherJoshua Lock2010-02-041-44/+50
| | | | | | | | | | | | | | | | | | 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>
* bitbake: Switch to bitbake-dev version (bitbake master upstream)Richard Purdie2010-01-201-7/+35
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Fix dict changing size problemsRichard Purdie2009-11-261-3/+5
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* fetch/__init__.py: Try and make the sortable_revision code mode readableRichard Purdie2009-11-131-1/+5
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Sync various functions with those from bitbake-dev and bitbake upstreamRichard Purdie2009-11-131-13/+18
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Sync module import cleanups back from bitbake trunkRichard Purdie2009-11-131-7/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/fetch: Ensure SRCREVINACTION always resets the core flags even when ↵Richard Purdie2009-09-241-3/+5
| | | | | | parsing failes by using a try/finally Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* __init__.py: export GIT_PROXY_COMMAND for those behind draconian proxiesMike Turquette2009-08-261-1/+1
| | | | Signed-off-by: Mike Turquette <mturquette@ti.com>
* bitbake: Remove persist_data domain renaming code as it appears to expose ↵Richard Purdie2009-07-301-3/+7
| | | | | | sqlite bugs and data consistency issues Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Add a --revisions-changed commandline option to indicate when ↵Richard Purdie2009-07-291-1/+22
| | | | | | floating srcrevs have changed Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Add PN to SRCREV keyhash in the persistent database to avoid ↵Richard Purdie2009-06-101-3/+8
| | | | | | conflicts between pacckages (from upstream bitbake) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: fetch/init: Add 'HOME' to list of variables exported when runnig ↵Richard Purdie2009-01-191-1/+1
| | | | fetcher commands
* Adds username support to the git fetcher, and exports SSH_AGENT_PID + ↵Robert Bragg2008-12-031-1/+1
| | | | | | | 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.
* bitbake: Optionally take username/password options from url parametersRichard Purdie2008-11-051-0/+4
|
* base.bbclass: Set GIT_CONFIG correctlyRichard Purdie2008-11-041-1/+1
|
* bitbake: Don't export the GIT_PROXY_COMMAND in the fetcher code since it ↵Richard Purdie2008-10-311-1/+1
| | | | means selective proxying isn't possible
* bitbake: Preserve http_proxy and ftp_proxy in fetcher command executionRichard Purdie2008-10-231-1/+1
|
* bitbake: Improve proxy variable handling in fetchersRichard Purdie2008-10-221-0/+6
|
* fetch/__init__.py: Add in hooks to make sure osc fetcher is seenRichard Purdie2008-10-021-0/+2
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5402 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake cache.py: When SRCREV autorevisioning for a recipe is in use, don't ↵Richard Purdie2008-09-301-0/+2
| | | | | | cache the recipe. Based on work from Heikki Paajanen git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5352 311d38ba-8fff-0310-9ca6-ca027cbcb966
* __init__.py: Error if SRCREV == INVALIDRichard Purdie2008-07-221-0/+5
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4919 311d38ba-8fff-0310-9ca6-ca027cbcb966
* Use bb.utils.md5_file isntead of calling md5sumRoss Burton2008-05-011-8/+1
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4386 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with bitbake 1.8 branchRichard Purdie2008-04-271-0/+24
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4352 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Improve fetcher runcmd function so error messages are visable and ↵Richard Purdie2008-04-081-5/+14
| | | | | | various variables are exported for the benefit of the git fetcher git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4194 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Update to bitbake 1.8 branch headRichard Purdie2008-03-031-2/+10
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3892 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake fetcher: Make invalid url errors clearerRichard Purdie2007-11-271-1/+2
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3262 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Convert fetcher code to using bb.utils locking functionsRichard Purdie2007-11-241-6/+3
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3223 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Update SRCREV fetcher code to cope better with multiple SCM packagesRichard Purdie2007-11-131-1/+30
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3145 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: fetcher init - clear data's internal expand cache since the cached ↵Richard Purdie2007-11-081-0/+3
| | | | | | SRCREV value will be wrong git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3104 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: fetcher updates - Add BB_GENERATE_MIRROR_TARBALLS option to allow ↵Richard Purdie2007-11-071-1/+18
| | | | | | 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
* bitbake: Add hg fetcher (from bitbake upstream)Richard Purdie2007-10-111-0/+2
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2865 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with 1.8 upstream branchRichard Purdie2007-09-051-0/+2
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2689 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with 1.8.8 releaseRichard Purdie2007-08-201-19/+20
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2513 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with 1.8 head. Adds locking to the fetcher to prevent parallel ↵Richard Purdie2007-08-161-1/+14
| | | | | | downloads, fixes key expansion issues and occasional missing dependency graph links git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2502 311d38ba-8fff-0310-9ca6-ca027cbcb966