summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch
Commit message (Collapse)AuthorAgeFilesLines
...
* Export ALL_PROXY for bitbake commandsDarren Hart2010-10-071-1/+4
| | | | | | | | We already export http,ftp,https proxy environment variables. Some environments, GNOME for instance, place the socks proxy in ALL_PROXY and all_proxy. Export it as well. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
* bitbake/fetch: if mirror fetching fails, ensure exception is raisedJoshua Lock2010-10-051-1/+3
| | | | | | | | | | | | | | We catch any exception raised by the fetchers go() method and attempt to work around it by trying any (post) mirrors which are configured. However, should the mirrors fail the exception is lost and the fetch is assumed to have completed successfully. Instead, save the exception and if the local file does not exist after trying the mirrors re-raise the exception. Fixes [BUGID #362] Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/fetch: fix logic to prevent fetches when the file already existsJoshua Lock2010-09-281-0/+2
| | | | Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/fetch: ensure the go() method completes when not using premirrorsJoshua Lock2010-09-101-6/+10
| | | | Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: Add proxy variables to standard export listZhai Edwin2010-09-101-1/+1
| | | | | | | With "no_proxy" exported to bitbake, both internal and externel file mirror can be used. "https_proxy" enable fetching "https://" file through proxy. Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
* bitbake/__init__.py: Fix named SRCREVS variable name ordering with backwards ↵Richard Purdie2010-09-091-1/+3
| | | | | | compatibility Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/fetch/git: fix try_premirror() definition .Method takes 4 parameters.Joshua Lock2010-09-081-1/+1
| | | | Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/fetch: fix by moving try_premirror() to the right placeJoshua Lock2010-09-081-12/+11
| | | | | | The previous commit didn't define the method as part of the Fetch object Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/fetch: add try_premirror method and special case git fetcherJoshua Lock2010-09-082-2/+20
| | | | | | | | | | | 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>
* fetch: fix setting of localpath in SRC_URI parametersJoshua Lock2010-09-061-0/+1
| | | | | | | | | When setting localpath in the SRC_URI parameters the basename should be set explicitly as the localpath() method is not called. Fixes [BUGID #81] Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/fetch: ensure the mirrored repository is updated as requiredJoshua Lock2010-09-011-1/+3
| | | | | | | | | If we fetch a tarball from a mirror it's entirely possible that the mirror will have been from before the required tag/branch/etc was included in the repository. To that end use forcefetch() as a way of testing whether the repository is up to date and if not fetch updates. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/git: define a forcefetch methodJoshua Lock2010-09-011-1/+6
| | | | | | | 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>
* bitbake/fetch: Respect forcefetch even when pulling from a mirrorJoshua Lock2010-09-011-3/+3
| | | | | | | | | When pulling from a premirror we would prefer a local tarball even when the caller had specified the forcefetch parameter. Add an extra parameter 'force' to try_mirrors, defaulting to False. If set the mirrors will be tested even if the file exists locally. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/git.py: Make sure different branches can have different revisions ↵Richard Purdie2010-08-131-1/+1
| | | | | | without triggering build count increases Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/git.py: Allow tracking of branches in SRC_URI without cloning for ↵Richard Purdie2010-08-132-4/+9
| | | | | | use with fullclone Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/git.py: Make sure a full clone checkout always updatesRichard Purdie2010-08-131-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* *: cosmetic whitespace removalBernhard Reutner-Fischer2010-08-031-1/+1
| | | | | | | (Bitbake rev: 2ed36a3d57de25e1af31d657a7b0b14857e5056a) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: fetch: Only mark srcrev recipes as uncached when outside of SRCREV ↵Richard Purdie2010-07-251-1/+2
| | | | | | caching mode Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* 3.0 prepChris Larson2010-07-022-12/+14
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Apply some 2to3 refactoringsChris Larson2010-07-021-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Start ditching fatal() calls in favor of raising appropriate exceptionsChris Larson2010-07-021-3/+3
| | | | | | | (Bitbake rev: 681b73fcc04e22e692ed61650ad53c800b64cace) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Change wget fetcher to use the runfetchcmdRyan Phillips2010-07-022-25/+6
| | | | | | | | | | * Fixes proxy support to honor standard proxy environment variables. * Quote environment variables (Bitbake rev: f84f382f340d6db15b9e5afb8c7c93969249a958) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* persist_data: cache connection and use cursorBernhard Reutner-Fischer2010-07-021-4/+5
| | | | | | | | | | Store database connection to persistent database in fetcher. (Bitbake rev: 8a6876752b90efd81d92f0947bfc9527d8260969) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* fetch: commentary typo fix in fetcher_init()Bernhard Reutner-Fischer2010-07-021-1/+1
| | | | | | | (Bitbake rev: b786f1f60fb50565295e7c8e979b471327d924f3) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* fetch: documentation typo fixBernhard Reutner-Fischer2010-07-021-1/+1
| | | | | | | | | s/initilize/initialize/ (Bitbake rev: 1497dd0d5bc0cca0de7d0ee9d314287000a0c34d) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* fetch: Check for existence of tar file along with md5 signatureKhem Raj2010-07-021-2/+2
| | | | | | | | (Bitbake rev: a5b1c0605328660de15bb8127b6f7d798c664d32) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Kill unnecessary usages of the types moduleChris Larson2010-07-021-2/+1
| | | | | | | | | | | | | types.IntType -> int types.StringType -> basestring ... Also moves our ImmutableTypes tuple into our own namespace. (Bitbake rev: 83674a3a5564ecb1f9d2c9b2d5b1eeb3c31272ab) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Apply some 2to3 transforms that don't cause issues in 2.6Chris Larson2010-07-023-16/+16
| | | | | | | (Bitbake rev: d39ab776e7ceaefc8361150151cf0892dcb70d9c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Switch some references to moved functionsChris Larson2010-07-022-3/+5
| | | | | | | (Bitbake rev: ddea2978cb969cf1381cfee5c055de0c9e56a4e3) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add a missing import of print_functionChris Larson2010-07-021-0/+1
| | | | | | | (Bitbake rev: 30ae747cc5c733512e417c61fca23c0cd15b0e44) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Apply the 2to3 print function transformChris Larson2010-07-023-3/+3
| | | | | | | (Bitbake rev: ff2e28d0d9723ccd0e9dd635447b6d889cc9f597) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Import fixupsChris Larson2010-07-021-2/+1
| | | | | | | (Bitbake rev: 4fa052f426e3205ebace713eaa22deddc0420e8a) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Formatting cleanupsChris Larson2010-07-029-45/+40
| | | | | | | (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>
* Ensure we always utilize the correct messaging domainsChris Larson2010-07-021-3/+3
| | | | | | | (Bitbake rev: 92a2e2e90981c0615171abe03645a772d84f6986) 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>
* Fix ud.basecmd error introduced by the FETCHCMD_git commitChris Larson2010-03-221-1/+2
| | | | | | | (Bitbake rev: 0bbcbe3548f39ca46c5aa3bf1a8681026e51cbf0) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add initial 'repo' fetcherTom Rini2010-03-222-0/+108
| | | | | | | | (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>
* Add FETCHCMD parameter for gitMartyn Welch2010-03-221-10/+13
| | | | | | | | | | | | | | | 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>
* 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>