aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch
AgeCommit message (Collapse)Author
2010-04-12Kill unnecessary usages of the types moduleChris Larson
types.IntType -> int types.StringType -> basestring ... Also moves our ImmutableTypes tuple into our own namespace. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-11Apply some 2to3 transforms that don't cause issues in 2.6Chris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-10Switch some references to moved functionsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-10Add a missing import of print_functionChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Apply the 2to3 print function transformChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Import fixupsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Formatting cleanupsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Stop using functions via 'bb' that were moved from there to other modulesChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Ensure we always utilize the correct messaging domainsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Drop doctest, as we aren't utilizing itChris Larson
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. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-03-24Fix 7 references to undefined variables, as spotted by pyflakesChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-03-23Expand PREMIRRORSEnrico Scholz
When not expanding PREMIRRORS, the functions fails/does not work correctly when PREMIRRORS is not a plain string (e.g. contains ${...} or a ${@...} statements). Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> Signed-off-by: Chris Larson <clarson@kergoth.com>
2010-02-25Avoid unnecessary calls to keys() when iterating over dictionaries.Chris Larson
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. Signed-off-by: Chris Larson <clarson@mvista.com>
2010-02-24Fix ud.basecmd error introduced by the FETCHCMD_git commitChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-02-24Add initial 'repo' fetcherTom Rini
Signed-off-by: Tom Rini <tom_rini@mentor.com> Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-02-19Move encodeurl, decodeurl into bb.fetch.Chris Larson
Signed-off-by: Chris Larson <clarson@kergoth.com>
2010-02-19Move MalformedUrl, VarExpandError into appropriate modules.Chris Larson
Signed-off-by: Chris Larson <clarson@kergoth.com>
2010-02-19Add FETCHCMD parameter for gitMartyn Welch
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". 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>
2010-02-15fix invalid method and logicJoshua Lock
The previous bitbake change included an invalid method call and inverted logic. (From Poky rev: 52cbb074235fc7b1bcd94bc1147c4607612fe701) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15Test premirrors and mirrors in checkstatus()Joshua Lock
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. (From Poky rev: ec92133d6fc049b4b666d670d3ac263de5a1d103) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15Fix try_mirrors() logic, was only trying the first mirror.Joshua Lock
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. (From Poky rev: c9fd126f64ec57cc0799ad03f32f509b5266e0ff) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15if PREMIRRORS set test for local file in FetchData.setup_localpathJoshua Lock
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. (From Poky rev: afe12428a9229b9a96f9e98c86d95786689aaf79) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15Enhance the fetchers' support for local mirrorsJoshua Lock
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. (From Poky rev: b571168ac7716a8ee4bee98ba5c3b53f70a13118) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15unify mirror support and make it independant of the fetcherJoshua Lock
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. (From Poky rev: 0737552c1de18c64db8a5a52248a3e7b217f30aa) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-21git: remove repodir usage after 57b3a9a86bf8c6940187c6a899cedbbbb484884aMartin Jansa
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-19fetch: Add GIT_PROXY_COMMAND to runfetchcmd functionRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-16Fix a couple copy-and-paste errors in fetcher comments.Robert P. J. Day
2010-01-16"pserver" is not a valid type for a CVS fetch, it's now a possibleRobert P. J. Day
method instead. This just gets rid of a historical holdover.
2010-01-16Fix an obvious copy-and-paste error in the documentation for aRobert P. J. Day
local fetch, and remove the option for a "patch" type URL, since patches use a "file" type URL.
2010-01-14fetch: Clean up debugRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-14git: Allow fetching a single subdirectory from a git repositoryPaul Eggleton
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-12-14fetch/__init__.py: Remove uneeded debugRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-12-14git.py: Trap empty return values and error (from Poky)Richard Purdie
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-12-14fetch/git.py: Add fullclone parameter to allow WORKDIRs to contain full git ↵Richard Purdie
repositories (from Poky) Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-12-14fetch/git.py: Move variable init into the localpath functionRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-11-22fetch/git.py: BB_GIT_CLONE_FOR_SRCREV updatesRichard Purdie
Based on a patch from Martin Jansa <Martin.Jansa@gmail.com>: * Add a _sortable_buildindex attribute and return the index separate from the revision * This means the git.py internal cache is no longer needed * Adds the returned value to the cache so if the mechanism for selecting the index changes, the values increase. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-21fetch/__init__.py: Replace _sortable_revision_valid attribute with an init ↵Richard Purdie
call for fetchers to clean up logic Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-21Optional LOCALCOUNT for recipeMartin Jansa
* Instead of autoincrement from persistent cache when srcrev is changed. * Should be used by distributions with multiple builders, where consistent PV is needed. * Can be used instead of PR bump in PVs like this "0.0+${PR}+gitr${SRCPV}" * BB_LOCALCOUNT_OVERRIDE to enable setting LOCALCOUNT for recipe * This way LOCALCOUNTs can be specified directly in recipes instead of separated distro config (as not all want to use them). And will be used only when BB_LOCALCOUNT_OVERRIDE set in distro config. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-06fetch/__init__.py: Allow SRC_URI to be overridden in fetcher go() functionRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-11-04git.py: Search mirrors for tarballs before fetching, not just local directoriesRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-11-04fetch/__init__.py: Try and make the sortable_revision code mode readableRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-10-23fetch/svk: Fix up breakage. Evidently nobody uses svkRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-10-23Add hg fetcher auto revisioning, patch from Carl Simonson <simonsonc@gmail.com>Richard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-10-17fetch/__init__.py: Fix a bug where errors could corrupt bitbake internal ↵Richard Purdie
state wrt SRCREVINACTION (from Poky) Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-10-17fetch/__init__.py: Remove hardcoded use of SRC_URI - OE.dev was adjusted for ↵Richard Purdie
this a long time ago (from Poky) Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-10-17Add a compare-versions command which returns whether the SRCREV versions ↵Richard Purdie
have changed since bitbake was last run (from Poky) Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-05-11fetch/__init__.py: Set HOME environmental variable when running fetcher ↵Richard Purdie
commands (from Poky)
2009-05-11fetch/git.py: Add username handling to git fetcher (from Poky)Richard Purdie
2009-05-11fetch/wget.py: Fix wget fetching of urls with parameters specified (from Poky)Richard Purdie
2009-05-11fetch/hg.py: Fix hg checkouts of specific revisions (from Poky)Richard Purdie