summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2011-02-10git.py: Remove the source tree tarball archivesYu Ke
Since we're now always providing the git source control files it becomes pointless to handle the tarballs of specific git revisions so drop this part of the fetcher. (From Poky rev: affcfe468a0c2993c0c4ace446248f85aee4315f) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: Add nocheckout option to disable checkouts and always ↵Richard Purdie
add scm data to checkouts (From Poky rev: 05048e0f9168ceb7d66f6ac79dcae42f1e696826) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2: Add git unpackYu Ke
The git download method clones the git repository to the local machine. The unpack process can be optimised to be a local to local machine clone or a direct readtree operation to the destination using git.will clone git repo to local, so git unpack can be simplified to only checkouting the code to the work dir. For fullclone case, we also need to manually copy all the ref info, which is needed by the later do_kernel_checkout(). Rather than use hardlinks, we reference the repository using alternatives since the download directory may be on a different filesystem. [Change to use -s by Richard Purdie] (From Poky rev: 3a3fc6b071f09970e7f79fb4f1a8f0013917371e) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Ensure the local revision counter takes a default value of ↵Richard Purdie
0, not None (From Poky rev: 05954ef4d7d882f34e2bb1f3bc44ad6f80c11d4c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Instrument fetchers when making network accessYu Ke
(From Poky rev: 029f8584d547c0792ffbe2f83451dcdfe2a3db7f) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2: add "BB_NO_NETWORK" optionYu Ke
Sometime user want a purely local fetching, i.e. using local mirror without any remote netowrk access. BB_NO_NETWORK option is introduced for this purpose check_network_access() is the guard for BB_NO_NETWOKR option. it should be put in any place that fetcher use network access (From Poky rev: 098e8ded339f3bf864f3bad9871028176f70b12b) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2: remove the obsolate Fetch.try_mirrors referrenceYu Ke
Fetch.try_mirrors is no longer exists, so the code is obsolate (From Poky rev: 733de7596c2ed78a846541b3290f01c21ff96606) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10git.py: split download to download() and build_mirror_data()Yu Ke
the download is to fetch the source from URL, the build_mirror_data is to create the mirror tar ball. the original go() method mix them together, it is more clean to split them. (From Poky rev: ef918a72de97fd2189e1c8487e371d13e18088fd) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2: rename "go" with "download" to better reflect its functionalityYu Ke
no functional change (From Poky rev: e05918937c515dff845fcb4c9e94f8ecbea8c957) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch: add fetch version to distinguish bb.fetch and bb.fetch2Yu Ke
there is case that we need to distingush bb.fetch and bb.fetch2, and use different API for bb.fetch and bb.fetch2. so it is necessary to add version info for distinguish purpose (From Poky rev: f12e71484593039cd58b6e7fadd038b28b05d849) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2: revise the Fetch.unpack APIYu Ke
change the unpack to use the urldata and rootdir parameter - urldata is the FetchData instance - rootdir is the dir to put the extracted source. the original unpack use current dir (os.getcwd) as destination dir, which is not flexible and error-prone (error will occur if caller not chdir to dest dir) (From Poky rev: 84ff79413a3b56f287f42b8ca1dd2ab194337c42) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2: add unpack method in fetcherYu Ke
copy exactly the base.bbclass:oe_unpack_file() to bb.fetch2 as the code base (From Poky rev: d8698b92ffcc2cbd29b57d3dc8e851d3d6c137f2) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}"Yu Ke
we should cache SRCREV whenever possible, the only exception is when SREREV is auto rev. so change the logic to only set __BB_DONT_CACHE at SRCREV = "${AUTOREV}" case (From Poky rev: 2b2dbf76126650750cb8a6778b837af6fe4c8b21) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10Fetcher: break the "SRCREVINACTION" deadlockYu Ke
Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}=@bb.fetch.get_srcrev(): get_srcrev()->setup_localpath()->srcrev_internal_helper() ->evaluate SRCREV->get_srcrev() current fetcher resolve the deadlock by introducing a "SRCREVINACTION" condition check. Althoguh it works, it is indeed not clean. This patch use antoehr idea to break the deadlock: break the dependency among SRCREV and get_srcrev(), i.e. assign a specific keyword "AUTOINC" to AUTOREV. when Fetcher meet this keyword, it will check and set the latest revision to urldata.revision. get_srcrev later can use the urldata.revision for value evaluation(SRCPV etc). In this case, SRCREV no longer depends on get_srcrev, and there is not deadlock anymore. (From Poky rev: 1589a1172f9432aed1cc9ce006f68cddf3073774) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2.bzr: add bzr urldata_initYu Ke
move the bzr specific urldata init from localpath to urldata_init so that it can be called early (From Poky rev: 550c3bd82115b4bdb8235da53cfc18b1dc39ad96) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2.hg: add hg urldata_initYu Ke
move the hg specific urldata init from localpath to urldata_init so that it can be called early (From Poky rev: f684ff18a2b9565823a41750af369dee392f6142) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2.svn.py: add urldata_initYu Ke
move the svn specific urldata init from localpath to urldata_init so that it can be called early (From Poky rev: 7420e70f4f03a18f9d5a0d3226918088af1032bd) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2.git.py: add git urldata_initYu Ke
move the git specific urldata init from localpath to urldata_init so that it can be called early (From Poky rev: 54e34f6e255d1717beada23638a5783c9dda42ea) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2: add urldata_init call for Fetch classYu Ke
FetchData has some fetch method specific data, and only fetch method knows how to initialize it. originally it is mostly initialized in Fetch.localpath(). But now there is requirement to call Fetch.latest_revision() before Fetch.localpath(), thus require another earlier place for initialization. so urldata_init is introduced for this purpose. it will be called in FetchData:__init__ and make all the Fetch functions useable after that. (From Poky rev: 2892cbfb114de1d2e2b5b479d5f928646ce5c831) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10BBHandler: remove bb.fetch referrenceYu Ke
BBHandler.py no longer use bb.fetch, so remove its import statement (From Poky rev: 9e3a92c04a5be4932a0324af4a74bce871126e9d) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/utils.py: add glob name matching to removeSaul Wold
(From Poky rev: 07088f7711e0b53c4fac3685d15d406cf4793602) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/msg: Ensure lower level debug messages have DEBUG prefix and reuse ↵Richard Purdie
log level values from formatter (From Poky rev: 7586adb360d8075d3e97184dfcafb1b13ce5f838) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10__init__.py: Fix debug log level handling to correct debug outputRichard Purdie
(From Poky rev: d7eebbe9dbf0d790d4af93466f5c27127cae0999) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-09Export KRB5CCNAME variableJavier Martin
This allows fetching git repositories using Kerberos authentication. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-02-09Fix comparison with SRCREVINACTION constantJavier Martin
Use '==' instead of 'is', otherwise it will always return true since 'rev' and "SRCREVINACTION" are not the same object. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-02-08event: fix exception formatChris Larson
Forgot to concatenate the lines returned by format_exception. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-02-08event: limit the number of traceback entries to 5Chris Larson
This is slightly more sane. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-02-08persist_data: kill unreachable break lineChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-02-08Shift traceback pre-formatting into LogHandlerChris Larson
It's cleaner to leave it behaving as usual, passing the exception data in the exc_info attribute of the LogRecord where it normally lies, and then let LogHandler make it pickleable so it can be sent to the UI. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-02-08persist_data: loop on database lock for table creationChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-02-08build: improve set -x handlingChris Larson
- set -x always, not just when debugging - set -x immediately before executing the function, rather than at the top of the script, so the output is no longer cluttered with all the variable and function definitions Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-01-28bitbake/runqueue.py: Avoid starvation of events to the serverRichard Purdie
The server UI was reading 1024 bytes, then sleeping for 0.25 seconds. Since most new LogRecord events are larger than this it leads to a build up of data which is only processed slowly, leading to a bottleneck and a slow down of all bitbake processes. Thanks to Dongxiao Xu <dongxiao.xu@intel.com> for the great work in debugging this. A large value has been left in for the read() command just to ensure some fairness amongst process handling if a task tries to log truly huge amounts of data to the server, or goes crazy and ensures the main loop doesn't stall. (From Poky rev: 06c6db7929c75f576a395fb442abe447b833fc3b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-20cache: fix docstring usageChris Larson
Use comments instead of docstrings where appropriate in CacheData. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-01-18cooker: also respond to SystemExit for execute_runqueueChris Larson
Without this, bitbake appears to hang when encountering an invalid task. In reality, the SystemExit flows up uncaught, the server may go away, and the UI doesn't know about it, so requires us to ^C to exit. This is a temporary measure. Poky's bitbake handles invalid tasks differently, and avoids this *particular* issue, but we do need to ensure that the server responds to SystemExit from the idle function in a sane way. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-01-12bitbake/knotty.py: Ensure task note messages are only surpressed at default ↵Richard Purdie
log levels (From Poky rev: 3f08b7f1eadc8d181c76339d14c7abb4f49cad57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-11codeparser: fix spacing in diagnostic messagesBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-01-11*: use utils.remove() some moreBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-01-11build: remove duplicate import of utilsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-01-10runqueue.py: Call bb.cache.Cache.loadDataFull function directly when dumping ↵Richard Purdie
signatures as per the rest of runqueue Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10bitbake/runqueue.py: Fix del_stamp calls and -f option to bitbake with the ↵Richard Purdie
BasicHash siggen code (From Poky rev: 48e567bb477ad468d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10msg: no need to hardcode the logging levelsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-01-10Inject taskpid into log records via our log handlerChris Larson
It turns out that while log filters added with addFilter are only associated with that logger, and not its children, handlers are inherited, and handlers can be filters. So, let's add filtering to our existing LogHandler class which dispatches our log records as bitbake events. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-01-10Switch to fetch2 fetcher code based on the environment variable BBFETCH2Richard Purdie
(From Poky rev: af06e4a8efbcaff657c397c34f2cb893d2d7f7f7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10bb.fetch2: replace bb.fetch with bb.fetch2 in the bb.fetchYu Ke
bb.fetch2 is copied from bb.fetch, and has many bb.fetch referrence. Fix these referrence with bb.fetch2 referrence (From Poky rev: c64b445f38179a117d39319f762f9dc2435da0ea) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10fetch2/git: Remove duplicated code only added for backwards compatibilityRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10bitbake: copy bb.fetch to bb.fetch2 as initial code base for fetcher overhaulYu Ke
Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10utils.py: Update log message to use the logger callsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10event.py: Improve debug about invalid eventsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10persist_data: Don't loop forever waiting on database locksRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10bitbake/runqueue.py: Fix a bug where do_setscene dependencies would be ignoredRichard Purdie
(From Poky rev: df8569b4d89ce83e3cafd87f2f37b795d1bfbd6d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>