fetch2/git: Stop git from triggering fsync() calls

We only ever clone other repositories, if there were a problem such as power
failure, we'd blow away data and rebuild. As such we don't need fsync(). With
filesystems like ext*, the fsync pushes nearly all the data out to disk
which impacts all running processes.

We therefore set a configuration parameter to disable the fsync() calls.

Also fixup a case where basecmd wasn't being used for no good reason.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2: Cleanup file checksum generation

Cleanup the fix done in f9416e76e272ba3249abff099f6f3a47fe82e03e.

Instead of adding continue statements we can just move the last
statements into the final else-clause.

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake-diffsigs: Fix runtime error when no arguments are given

If bitbake-diffsigs is run without arguments it will error:

    Traceback (most recent call last):
      File "./bin/bitbake-diffsigs", line 121, in <module>
        if output:
    NameError: name 'output' is not defined

Fix this by moving the check for output into the inner else-clause.

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Revert "fetch2: Cleanup file checksum generation"

This reverts commit 6dfb33fd7204e09815bde7ba5bf21941a73fe965.

It causes an unindeded change in behaviour.
HG Fetch with username and password in url

Following up a previous patch for mercurial fetcher, I just fixed a
problem when calling update on a repository with subrepositories enabled.

Attached a patch that fixes this problem

>From caae519a2bd64bf7c729bb26aff344827def47fb Mon Sep 17 00:00:00 2001
From: Volker Vogelhuber <v.vogelhuber@digitalendoscopy.de>
Date: Tue, 29 Apr 2014 15:29:47 +0200
Subject: [PATCH] - fixed authentication issues in case of using sub
 repositories

Signed-off-by: Volker Vogelhuber <v.vogelhuber@digitalendoscopy.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2: Cleanup file checksum generation, v2

The initial version of this patch was reverted in

0a94e568152de550dedc8135a766beb18bf064ab

However, it was later agreed upon that it was reverted due to
a misunderstanding during code review; the patch is ok.

This version of the patch also removes an unneeded initialization of
the 'checksum' variable outside the scopes it is being used in.

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
codeparser: don't interact with the cache for subshells

Doing so was causing leakage between the execs of the main value and that of
the subshell value, and was causing the cached subshell value to be used for
the overall variable. At the least this could cause execs contamination
between two variables that while differing, run the same subshell. Beyond
that, it's possible we could have been using an incomplete cached value of
a subshell for that of the main value.

Before this, bb_codeparser.dat would change between parses with differing
bbfile parse order. After, it does not change.

The codeparser cache version is bumped, to ensure we don't use potentially
incorrect cached values from previous runs.

This should hopefully resolve the difficult-to-reproduce issues we've seen at
Mentor Graphics where bitbake emits a script to run a task and misses
dependent functions, resulting in 'command not found' failures. This issue has
also been mentioned on the oe devel list, where someone hit a case where
oe_runmake was missing from a do_install task (IIRC). Adding debug information
showed that bitbake's information about the variable dependencies for this
task is inaccurate in the failure cases.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bb.utils, bb.codeparser: Add bb.utils.contains_any

This includes contains_any in the special handling code for sstate. It
does not take into account the equivalence of the values. In current
code, considering 'bb.utils.contains_any("A", "foo bar", ...)':

A = "foo"
A = "bar"
A = "foo bar"

All those will get different signatures.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
world-image: add extra target

* similar to world target, but collects all PACKAGES
* recipes marked with EXCLUDE_FROM_WORLD are excluded from world as well
  as world-image
* recipes marked with EXCLUDE_FROM_WORLD_IMAGE are excluded completely
  from world-image, sometimes you can build 2 recipes in same sysroot,
  but cannot install them in the same image
* PACKAGES listed in EXCLUDE_PACKAGES_FROM_WORLD_IMAGE are also
  excluded. You can remove e.g. ${PN}-dbg, but keep all other PACKAGES.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>