summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
Commit message (Collapse)AuthorAgeFilesLines
* fetch2/git: create bareclone optionBruce Ashfield2012-02-241-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For similar reasons as the nocheckout option, packages that need enhanced control over the checkout and branch creation on a repository may want a complete mirror/bareclone created of the repository when performing the unpack. This is useful/required when a local respository is being used, but local tracking branches have not been created for all branches that a given recipe needs to manipulate. The standard git clone operations will create remote branches for the branches that are local to the source repository, but branches that are remote do not translate to the destination repository. Doing a mirror/bare clone of the source, makes all branches available to the repository. This is a particular use case, but the ability to do a bare clone creates great flexibility in recipe space, with no impact to recipes that don't need this functionality. To implement this, a new option 'bareclone' is craeted which creates a mirror copy of the repository and leaves it bare in the unpacking phase. A recipe that uses this option must both checkout and debare the repository itself. (Bitbake rev: 82482aae6f311c994275fb0b6b32d954bbfc78c3) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: Add workaround for clone using alternates problemRichard Purdie2012-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To quote my report of this to the git mailing list: """ I have a problem with git clone commands using alternates failing by mixing up different repositories. I have a situation where I could end up with both: /srv/mirrors/repo /srv/mirrors/repo.git as bare clones. I then try cloning "repo" with alternates with the command: $ git clone -s -n /srv/mirrors/repo /tmp/foo Cloning into /tmp/foo... done. $ cat /tmp/foo/.git/objects/info/alternates /srv/mirrors/repo.git/objects Note how I'm now referencing repo.git, not repo. This doesn't work as expected giving some very bizarre results when actually using the repository. I appreciate this is a rather bizarre corner case but its one that is breaking the build system I work with. Ideally people would use a consistent URL for the same repository but we have an example where they haven't and this really shouldn't break like this. Looking at the code, the cause seems to be clone.c:get_repo_path(): static char *suffix[] = { "/.git", ".git", "" }; since its looking in order for: repo/.git (fails) repo.git (suceeds, incorrect) repo (never looked at) I'm not sure what would break if that order were to change, swapping the last two options. I can "force" the issue by running: git clone -s -n /srv/mirrors/repo/ /tmp/foo but this results in the slightly odd looking: $ cat /tmp/foo/.git/objects/info/alternates /srv/mirrors/repo//objects which does at least work. """ This patch adds the trailing slash to ensure the correct repository is referenced at the expense of some ugliness in the alternates file. (Bitbake rev: d978e7b35550e3785c7c567ffe4c40a3c3947450) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: allow resuming interrupted fetchPaul Eggleton2012-01-201-3/+3
| | | | | | | | | | | | | | | | | A lot of our checks in the fetcher code assume that if the downloaded file exists, the download finished successfully; this meant that if BitBake was interrupted in the middle of a fetch then it would not resume the fetch the next time, but instead attempt to use the half-fetched file and usually fail as a result. Since we're already writing a ".done" stamp file when a fetch completes, just check for its existence and assume the download didn't complete successfully if it isn't present. (Bitbake rev: 721e986624529aedef96dd06c9fe6243f2897b10) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: reduce output for fetch failuresPaul Eggleton2012-01-151-1/+6
| | | | | | | | | | | | | | | | | | | Make the warning for the initial fetch failure a single line - we don't need the full command and output here yet, but write it into the log in full as a debug message. However, if fetching from mirrors fails as well then print out the full details for the first error that occurred as an ERROR rather than a WARNING. Since this is logged as an ERROR, combined with an earlier patch it suppresses the full log which does make the output much more readable for any fetch error. Fixes [YOCTO #1832]. (Bitbake rev: 6bbdc7d259c0cc041b62dbdb26cfc3ec6edcb6f3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: correctly decode exit signal/statusPaul Eggleton2012-01-151-4/+7
| | | | | | | | | | | | | The termination signal and exit code of the fetch process were not being decoded correctly, resulting in bitbake reporting that the process terminated with a signal of the exit code (if it was under 255). There are functions in the Python os module to do this decoding correctly (for Unix at least), so let's use them. (Bitbake rev: 50aea9a76e40cf71cc3f1462c88298e4846a031c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: improve error formatting for fetcher errorsPaul Eggleton2012-01-151-4/+7
| | | | | | | | | | | | | | | * The "name" argument to FuncFailed is rarely used as a name in actual usage within bitbake, so don't treat it as one in the output. * Don't print URL for FetchError if it was not specified (i.e. don't output "Fetcher failure for URL 'None'") * Don't include URL in "unable to fetch from any source" message since we supply it to FetchError and it will be printed anyway. * Don't include URL in "checksum failed" message for the same reason (Bitbake rev: 86811bd85e2e453ee92a05fe60160d9b49ac69e8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: change colon to dot in ud.hostJuraj Hercek2012-01-041-1/+1
| | | | | | | | | | | | | | | | | | | Local cloning of git repositories from DL_DIR into WORKDIR fails when using ssh URL with port specification e.g. "ssh://user@host:port/path/to/repo.git". Git fetcher clones such remote repository into "${DL_DIR}/git2/host:port.path.to.repo.git". However, when clonging from ${DL_DIR}/git2/host:port.path.to.repo.git into ${WORKDIR}, git fetcher fails with "ssh: Could not resolve hostname ${DLDIR}/git2/host: Name or service not known". A solution is to replace ":" by "." in host component, similarly as it is done when replacing "/" with "." in path component, so that local clone directory in DL_DIR looks like this: "host.port.path.to.repo.git". (Bitbake rev: 1f2867b79f1cd2bfbdc849ba5677a39db6fa3396) Signed-off-by: Juraj Hercek <juraj.hercek@jhksoftware.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: fix Exception parameters when BB_STRICT_CHECKSUM enabledJoshua Lock2011-12-051-3/+3
| | | | | | | | | | | | BB_STRICT_CHECKSUM caused a backtrace as the FetchError parameters are incorrectly specified such that FetchError is being passed 8 params when it's expecting 3. This fixes the parameters so we're passing a formatted string and the url. (Bitbake rev: b8b2f4287c9125542b18a294c0a94ed89a7e73a8) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Update users of getVar/setVar to use the data store functions directlyRichard Purdie2011-11-272-41/+41
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: Improve uri_replace to handle paths with no trailing '/'Richard Purdie2011-11-241-3/+10
| | | | | | | | | | | | | | | | | | | | | | Currently if you specify a mirror like: file://.* http://linux.freescale.net/yocto/sstate-cache it won't work as you expect whilst: file://.* http://linux.freescale.net/yocto/sstate-cache/ will since it has the trailing slash. This patch handles both cases correctly. It also adds some debug to the uri_replace function since its near impossible to debug it without some kind of output. [YOCTO #1578] (Bitbake rev: a0246bf09c93bb657eaf6ba61d090b247ed33640) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/local: Don't default to files in DL_DIR for file:// urlsRichard Purdie2011-11-241-3/+1
| | | | | | | | | | | | | | | Defaulting to any file in DL_DIR as the first match for a file:// url doesn't make much sense and can lead to unexpected results. This patch changes the logic so this is the last fallback location instead. Whether it should be using DL_DIR at all for this is a good question but something for another patch. [YOCTO #1710] (Bitbake rev: 5597a68fac0954c682b67471722c2643e2415f99) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: enable checksum definition as SRC_URI parameterJoshua Lock2011-10-241-2/+8
| | | | | | | | | | | | | | | | URI parameters should be able to be defined as a parameter of the SRC_URI, this patch enables thus for checksums. An example; SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz;md5sum=a3270bab3f4b69b7dc6dbdacbcae9745;sha256sum=3ba691ee2431f32ccb8efa131e59bf23e37f122dc66791309023ca6dcefcd10e" Addresses the remainder of [YOCTO #1399] (Bitbake rev: 5f8f923b76722c9b6c7ffbe19e94df50f900155f) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: improve usability of checksumsJoshua Lock2011-10-241-34/+38
| | | | | | | | | | | | | | | | | | | | This patch improves the usability of checksums by only requiring one checksum be defined. Further, checksum verification will provide as much information as possible at, rather than a bit at a time. No longer will you need to run fetch, see an md5sum mismatch, fix it, run fetch, seen an sha256sum mismatch, fix it and fetch again. If neither checksum is defined we now report both missing sums at once - rather than one after the other. Finally, if both sums are incorrect, we'll report both incorrect sums at the same time. Fixes part of [YOCTO #1399] (Bitbake rev: 30ca41e596955fcbbe1ae6f4436ecf14cef96f8d) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: Export additional variables to the fetchersMatthew McClintock2011-10-061-1/+2
| | | | | | | | | | git could need these environment variables when working behind a proxy (Bitbake rev: dca46cc2e1c75b6add2c4801e2994a4812745f5b) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: Make git fetch run with -f so rebased branches don't failMatthew McClintock2011-10-041-1/+1
| | | | | | | | | | | | | | git fetches can fail (or at least return failed) when trying to fetch and prune rebased branches. This patch simply adds a -f to the git fetch command so these failure are ignore Generally, if some SHA was rebased away it's not coming back so there is no point in not doing this force (Bitbake rev: a7b75e4db52445b30ec0fc0053dcf454f5f7d2db) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Fix mercurial fetcher in fetch21.1_M4.rc3Julian Pidancet2011-09-211-1/+1
| | | | | | | | | | | The _build_revision method in Hg class gets called with the wrong number of arguments. This tiny patch adds a 5th argument to the method declaration to prevent python from throwing an exception. (Bitbake rev: 623e9c7f7a9cf12b8c81c26cc608990682a601dd) Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: fix subpath destination directoryPaul Eggleton2011-09-201-1/+3
| | | | | | | | | | | | | | Make the git fetcher's subpath (path within the git repo to fetch) option set the destsuffix (destination directory) option by default. This reverts the behaviour of subpath to the same as when it was introduced. Based on a patch by Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> (Bitbake rev: 3e7f8afeacf7c8c8de3e87778a3907e33d4a06b3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: be more carefull in _contains_ref when checking git log outputMartin Jansa2011-09-201-1/+4
| | | | | | | | | | | * in some cases there could be output like this ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded: ignored. before wc -l output and returned 'output.split()[0] != 0' is always True (Bitbake rev: 3a54dcc09a12406ec6cf22b4b1a2cc4fc203822c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: fix logger.debugMartin Jansa2011-09-201-1/+1
| | | | | | | | | | * logging/logger typo was fixed in 38a598731b49c8a0ba0ede570adc33eb1e848235 but debug level is still missing (Bitbake rev: 9de432fe2348cdbc93037bb49abb508d1fd38336) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/wget: make checkstatus() quieterJoshua Lock2011-09-201-3/+4
| | | | | | | | | | Change the wget fetcher to not emit the commands output when calling checkstatus, this matches the behaviour of the git fetchers checkstatus() method. (Bitbake rev: 5896d8ff7bcf85b3bab20fc27c4c15e87f86b4d9) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* git.py: Fix logging vs logger typoRichard Purdie2011-09-171-1/+1
| | | | | | (Bitbake rev: 1043bbcd095314e717b372ed69ea6ee5b8a06573) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: Allow to specify the name of the checkout directoryHolger Hans Peter Freyther2011-09-021-1/+2
| | | | | | | (Bitbake rev: 639db8c766cada7180f9447f51303f9b30d7e817) Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2/git: Ensure .gitconfig file is ignoredRichard Purdie2011-08-311-5/+6
| | | | | | | | | | | | | | | If a user has a ~/.gitconfig file, git fetch --all will reference it. To avoid this we should run git fetch with an explicit url telling it to fetch all references (which includes tags). I'm assured this means git won't reference the file, see the discussion on the git mailing list (subject Overriding ~/.gitconfig using GIT_CONFIG). [YOCTO #1134] (Bitbake rev: 8540c09d4e509e3277940464c71174d8a0aca6ab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/fetch2/git: add checkstatus commandJoshua Lock2011-08-241-0/+8
| | | | | | | | | Use git ls-remote to implement checkstatus command for the git fetcher. (Bitbake rev: 0ed281feb6d244d3700da484f4e83394ae394f93) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: Add rsync as a valid git protocolRichard Purdie2011-08-231-1/+1
| | | | | | (Bitbake rev: 4cc4e318fd6907a4742f327177f321d140385c9e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetcher2: show warning message when checksum is mismatchYu Ke2011-08-101-1/+1
| | | | | | | | | | | | | | | | Currently, if checksum mismatch, fetcher will try mirror, and if mirror fetching fail, it will show error "Unable to fetch URL xxx from from any source" which actually hide the real reason and make user confuse. so showing warning message will make it more clear. Fix [YOCTO #1256] (Bitbake rev: b3e924297d670963714343d02f7898798fec84fd) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetcher2: retry mirror if upstream checksum mismatchYu Ke2011-07-131-11/+20
| | | | | | | | | | | | | | | This patch is for [YOCTO #1085] fix. If the upstream fails a checksum, retry from the MIRROR before giving up. This will add more robust fetching if an upstream serves a bad file or webpage. fetching of distcc prior to the move from samba -> googlecode is a good example of this. (Bitbake rev: b631e922257de52bf2247c01152d9856c870e7d0) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: Tweak git fetcher to handling repo updates correctlyRichard Purdie2011-07-081-2/+2
| | | | | | | | | | | | | | | | | | Currently the git fetcher can malfunction when branches change in remote repositories since whilst the update code updates the "origin" remote, this isn't linked to the local heads. By passing the --mirror option to 'git clone' and 'git remote add', linkage between the local heads and remote heads is created with a 1:1 mapping, hence all the appropriate heads are then updated correctly. This fixes some issues which have been seen with the Yocto autobuilder mirrors. (Bitbake rev: 3725602ec53df116dc108b3197a426b86ca43d5f) Signed-off-by: Richard Purdie <richard.purdie@linux-foundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git.py: improve error reporting when an invalid protocol is usedScott Garman2011-06-221-0/+3
| | | | | | | | | | | | | | | | | | | | When an invalid 'protocol' parameter is used in a git SRC_URI, the error reported was not helpful: ERROR: Function 'Fetcher failure for URL: 'None'. <environment dump> fatal: Could not make temporary directory: No such file or directory So instead check that ud.proto is set to something valid, and if not raise a meaningful ParameterError which explains that the protocol type is the source of the problem. This fixes bug [YOCTO #1142] (Bitbake rev: a2a29b72275ab03a263f4479a590b92111a0d6a8) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* make exception handling syntax consistentScott Garman2011-06-151-2/+2
| | | | | | | | | | Update exception handling syntax to use the modern style: except ExcType as localvar (Bitbake rev: dbf5f42b06bef81749b13aa99945cc1292a6676d) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: When replacing URLs in mirror handling mask out empty entriesRichard Purdie2011-06-131-1/+4
| | | | | | | | | | | | | The symptom of this problem is something like a cvs url which specifies a username where the username is then passed through to something like an http mirror. This patch fixes things by ensuring empty entries are preserved in the new URL. (Bitbake rev: c1d978d7bd1ac8eb1e2d50029ab2384be9f72fb4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: ensure network check log matches actual commandDarren Hart2011-05-271-6/+10
| | | | | | | | | | The git command string logged via check_network_access() does not match the actual command executed in a few places. Ensure that it does. (Bitbake rev: 10f3ca52dc274cd8b240987cfd7cd003aeda7ab1) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: use logging.debug() and clarify messagesDarren Hart2011-05-271-2/+5
| | | | | | | | | | Replace a call to print() with logging.debug() and flesh out the message to clarify the state being reported. (Bitbake rev: 9a28f7744e2f4224e7c097b8c4c1d49731b9a47e) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: enhance the unpack by using "git checkout"Yu Ke2011-05-271-2/+5
| | | | | | | | | | | | | | | current git fetcher unpack method only checkout index and working tree, but did not did not update the git branch in ref/heads, so user may not get right info in ${S} by using git. this patch enhance the unpack by using git checkout to fix this issue. Fix bug [YOCTO #1089] (Bitbake rev: c0eb89054aef4957966f98b44e7f3cce14fb337a) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: add document for git fetcher supported optionsYu Ke2011-05-271-3/+35
| | | | | | | (Bitbake rev: d424ecd751f80a7aecec26e1a0cbd2a1b38e076b) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: unify the nocheckout option formatYu Ke2011-05-271-3/+1
| | | | | | | | | | | | | make the nocheckout option format to be: default is "0", use nocheckou=1 to set this option with this patch, the format will be consistant with other bitbake options like rebaseable (Bitbake rev: bd51659f5ee521cb8e6631d5f26792ab573e6b30) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git: change default protocol from rsync to gitYu Ke2011-05-271-1/+1
| | | | | | | (Bitbake rev: e912122706b402f99848d50f721f179491644d0e) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* git fetcher: add support for rebaseable git repoYu Ke2011-05-171-8/+20
| | | | | | | | | | | | | | | | | | | | | | Some upstream git repo may rebase in the future, which means current revision may disappear from the upstream repo after the rebase. current git fetcher can not handle this case, because the git mirror tar ball is per repo, and may also change in the rebase and lost the current revision info. To fix this issue, this patch - add rebaseable tag in the SRC_URI - for rebaseable repo, make git mirror tar ball per revision, in this case, even upstream rebase, the git mirror still has the current revision info. - for rebaseable repo, generate mirror tar ball by default, since the repo may change in the future. (Bitbake rev: 92701d4c5372db48847c70da4ebd0736d79fd54b) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* persist_data: implement comparison, same as dictChris Larson2011-05-061-9/+6
| | | | | | | (Bitbake rev: 1190406c526c7bb7cf415867be83e0403812a7dd) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* persist_data: raise KeyError on missing elementsChris Larson2011-05-061-8/+7
| | | | | | | (Bitbake rev: a4f62433845c29f98c6a9746d5d2847bf9506ea5) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Initial work on getting bitbake working under pypyChris Larson2011-05-061-17/+15
| | | | | | | | | | | - use os.chmod, not os.fchmod, as the latter is missing under pypy - rearrange our imports a bit - don't die if sqlite3 is missing shared cache support (Bitbake rev: f229824dc9c453adf6067500e2bf6761536e4f2f) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* git fetcher: make tag back to work, fix Yocto bug 972Yu Ke2011-05-031-0/+1
| | | | | | | | | | | | In current git fetcher, tag does not work due to commit http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=5920e85c561624e657c126df58f5c378a8950bbc. Tag is not in sha256 form, so it will be treated invalid, and silently replaced by latest revision. To fix it, this patch treat tag name as branches name, thus it will be handled correctly later. Thanks Richard for reviewing and proposing the better approach. Fix [YOCTO #972] CC: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Yu Ke <ke.yu@intel.com>
* bitbake/fetch2: Fix the problems introduced by the git fetcher AUTOREV fixRichard Purdie2011-04-205-13/+17
| | | | | | | | | The ordering constrains on the urldata_init functions are not straight forward. To avoid further problems, create a helper function to setup the source revisions which the init functions can all at the appropriate point. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2/git: Fix a bug where AUTOREV and the git fetcher interact badlyRichard Purdie2011-04-192-6/+10
| | | | | | | | | | | | Fix a bug where ud.branches were being referenced before it was set by the git fetcher when using AUTOREV. To do this some ordering needed to be changed. This fixes errors like: ERROR: Error parsing /recipes-kernel/linux/rt-tests_git.bb: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception AttributeError: 'FetchData' object has no attribute 'branches' Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Fix more incorrect usages of 'is'Chris Larson2011-03-314-12/+12
| | | | | | | (Bitbake rev: a26a2f548419af0e971ad21ec0a29e5245fe307f) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2/local: Fix inverted update required logicRichard Purdie2011-03-091-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Allow local file:// urls to be found on mirrorsRichard Purdie2011-03-082-9/+19
| | | | | | | | | | | | With the current implementation, file:// urls as used by sstate don't access the mirror code, breaking sstate mirror support. This change enables the usual mirror handling. To do this, we remove the localfile special case, using the basename paramemter instead. We also ensure the downloads directory is checked for files. The drawback of this change is that file urls containing "*" globing require special casing in the core. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch, fetch2: Get rid of DeprecationWarning noticeKhem Raj2011-03-0310-11/+11
| | | | | | | | | | | | | * 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>
* bitbake/fetch2: Ensure SRCREV_pn-PN is checked for a revision when the ↵Richard Purdie2011-02-231-1/+3
| | | | | | SRC_URI is unnamed Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fecth2: Ensure BB_FETCH_PREMIRRORONLY being set as false is handled ↵Richard Purdie2011-02-161-1/+2
| | | | | | correctly Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>