aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-12-06main: Don't use print() directly, use loggerRichard Purdie
Avoid failures like: 2018-12-04 03:30:56,033 - oe-selftest - INFO - ====================================================================== 2018-12-04 03:30:56,033 - oe-selftest - INFO - FAIL: pkgdata.OePkgdataUtilTests.test_find_path (subunit.RemotedTestCase) 2018-12-04 03:30:56,033 - oe-selftest - INFO - ---------------------------------------------------------------------- 2018-12-04 03:30:56,033 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last): [...] AssertionError: 'Previous bitbake instance shutting down?,[77 chars]xist' != 'ERROR: Unable to find any package produci[14 chars]xist' - Previous bitbake instance shutting down?, waiting to retry... ERROR: Unable to find any package producing path /not/exist We need to use the logger so output is correctly handled in such cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-06process: Flush key output to logsRichard Purdie
Small tweak to ensure these items are printed into the log since there is other logging code which looks for the header and this makes it clearer the server did start but is slow somewhere in startup. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-06fetch2/svn: Fix SVN repository concurrent update raceUlf Magnusson
The ${DL_DIR}/svn directory is used by BitBake to keep checked-out SVN repositories from which tarballs are generated. These repositories were protected from concurrent update with a lock on the tarballs. However, the tarballs are specific to the SRCREV and module checked out (many tarballs can come from the same repository), meaning a repository could be modified concurrently if two recipes checked out two different SRCREVs or modules from it in parallel. This caused errors like the following: ERROR: Fetcher failure: Fetch command failed with exit code 1, output: svn: E155004: Run 'svn cleanup' to remove locks (type 'svn help cleanup' for details) svn: E155004: Working copy '/home/foo/downloads/svn/repo/trunk' locked. svn: E155004: '/home/foo/downloads/svn/repo/trunk' is already locked. Fix it by adding a per-repository lock that's independent of the module and SRCREV. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@bmw.de> Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-06runqueue: Ensure disk monitor is started when no setscene tasks are runRichard Purdie
Currently if there are no setscene tasks, the disk monitor isn't started. Move the startup code to somewhere to ensure it always is started. This issue would partially explain occasional selftest failures. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-06server/process: Fix ConnectionRefusedError tracebacksRichard Purdie
Improve connetion refused error handling: NOTE: Retrying server connection... NOTE: Reconnecting to bitbake server... NOTE: Retrying server connection... (Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/server/process.py", line 471, in connectProcessServer sock.connect(os.path.basename(sockname)) ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/main.py", line 464, in setup_bitbake server_connection = bb.server.process.connectProcessServer(sockname, featureset) File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/server/process.py", line 502, in connectProcessServer os.close(i) TypeError: an integer is required (got type NoneType) ) WARNING: /home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/main.py:481: ResourceWarning: unclosed <socket.socket fd=14, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0> logger.info("Retrying server connection... (%s)" % traceback.format_exc()) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-06fetch2: Avoid warning about incorrect character escaping in regexRichard Purdie
Fixes: lib/bb/fetch2/__init__.py:259: DeprecationWarning: invalid escape sequence \w re.compile("^\w+:(?!//)").match(uri): Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-26tests/fetch: Update after recent gitsm message changesRichard Purdie
Also use assetIn instead of assertTrue which aids debugging failures. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-26cooker: Fix multiconfig dependenciesAlejandro Enedino Hernandez Samaniego
When multiconfig is enabled the cooker adds providers for all the targets to be built on all the multiconfig variables that were set, regardless if there is a dependency to it or not. This causes an issue when a certain target is incompatible with one or more of the multiconfigs, e.g. the target is not in COMPATIBLE_MACHINE for one of the MACHINEs being built, causing the cooker to error out since no providers can be found for that certain target on that multiconfig. This patch modifies the behavior to only look for PROVIDERS for a target on the multiconfig that was selected to be built, PROVIDERS are then looked for in other multiconfigs only when there is a defined dependency to them. [YOCTO #12985] Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-26fetch/git: fix AttributeError in shallow extraction logicChristopher Larson
This code checks to see if shallow is either disabled or the tarball is missing, but the else block tries to print the tarball filename, and this attribute doesn't exist at all when shallow is disabled. Handle the two cases separately to give sane errors for both cases without the exception: Exception: AttributeError: 'FetchData' object has no attribute 'fullshallow' Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-06server/process: Fix unclosed socket warnings upon server connection refusedRichard Purdie
Extend the server error handling to avoid: Reconnecting to bitbake server... NOTE: Retrying server connection... (Traceback (most recent call last): File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/main.py", line 464, in setup_bitbake server_connection = bb.server.process.connectProcessServer(sockname, featureset) File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/server/process.py", line 457, in connectProcessServer sock.connect(os.path.basename(sockname)) ConnectionRefusedError: [Errno 111] Connection refused ) WARNING: /home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/main.py:481: ResourceWarning: unclosed <socket.socket fd=20, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0> logger.info("Retrying server connection... (%s)" % traceback.format_exc()) NOTE: Starting bitbake server... Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-05siggen: Correct format argument substitutionMike Crowe
Use % operator to ensure that the dependency is substituted into the error message correctly. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-02fetch: Also export GIT_SSH environment variableMike Crowe
Support users who want to specify a custom ssh to Git using an environment variable. (This lets build systems work without requiring users to configure Git explicitly.) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-02bitbake: toaster: allow OE_ROOT to be provided through environmentAwais Belal
Updates for YOCTO #12891 allowed a user to have a directory structure different to that of yocto (bitbake isn't inside oe-core) whereas the definition of OE_ROOT in the main toaster binary still assumes the same while checking for .templateconf and hence we see an error on the cmdline in such cases: bash: <repo-path>/bitbake/bin/../../.templateconf: No such file or directory The change here now allows the user to provide OE_ROOT through the environment in such cases and otherwise defaults to the older mechanism to fix this issue. Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-01fetch2/gitsm.py: Fix the references when the module and path are differentMark Hatle
Git does not require the module and target path to be the same in the .gitmodules file. This incorrect assumption was being made previously causing various unpack failures. An example .gitmodule showing this issue: [submodule "plugins/WaveShaper/Libs/inih"] path = plugins/wolf-shaper/Libs/inih url = https://github.com/pdesaulniers/inih.git The unpack function also needed to work in a loop on the overall submodules_queue. Before it could have missed items that were not in the primary repository. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-01fetch2/gitsm.py: Disable branch checking on submodulesMark Hatle
Submodules by definition refer to a specific commit, not branch. If we don't ignore the branch, then any commits on a submodule on a branch different then the original module will trigger a failure that the commit is not on the branch. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-31bitbake-user-manual: Added hard-spacing to "_remove" example.Scott Rifenbark
Rendering the manual to its HTML form was collapsing the two leading and four trailing whitespace characters into single whitespace characters. I inserted multiple "&nbsp;" strings to force the spacing to come through. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29bitbake-user-manual: Updates to variable wildcard support.Scott Rifenbark
Fixes [YOCTO #12390] Applied some fixes to the variable wildcard support documentation in the BitBake manual. Wording changes and changes to make links referencing Python syntax go to version 3 rather than version 2. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29bitbake-user-manual: Added wildcarding descriptionsScott Rifenbark
Fixes [YOCTO #12390] Added specific descriptions for how wildcarding works for a variety of variables and files (e.g. append files). Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-20bitbake: Bump version to 1.40.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-19data_smart: Fix removal handling interaction issue with overridesRichard Purdie
If a variable has a _remove applied to it but that variable is in turn 'renamed' through OVERRIDES, the removal gets lost with the current code. TEST = "foo" TEST_someval = "bar" TEST_someval_remove = "bar" OVERRIDES = "someval" currently gives "bar" for TEST but should give "". This fixes the code to track the removal and adds a test case to ensure this doesn't regress again. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17test/data: Add new tests for task checksum changing/not changingRichard Purdie
This adds some basic tests for task checksums to ensure that the checksums: * change when variables change * change when active _remove operators are present * don't change when the _remove operators are not active * change when an active contains() expression is present * dont' change a contains() expression isn't active There is a lot of other functionality which should be added to this test but its a start. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17data/siggen: Extract task hash generation code into a functionRichard Purdie
By creating a standalone function, we can add better functional testing of this code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17bitbake: data: Ensure task checksums account for remove dataRichard Purdie
Currently remove operations are not being accounted for in the task checksums. This is a fairly serious oversight and needs to be fixed. To do so, we need internal data from getVarFlag combined with the expanded variable data so that only "active" remove operators are accounted for in the task checksum. We can get this from the new optional removes attribute in the returned parser object. The code can then use the data on active remove operators to account for the removals in task checksum but only when the removal is active. We have to be careful here not to reference any expanded data since this may for example contain build paths. This means we can only map back and reference the unsplit (and hence unexpanded) remove string which may expand to multiple removal values. [YOCTO #12913] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17data/data_smart: Allow getVarFlag to return the variable parser objectRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17data_smart: Fix expand_cache and _remove operator interaction issuesRichard Purdie
The contents of the expand_cache is meant to match the return value of getVarFlag() but the implementation was mostly in expandWithRefs(). If an incorrect key was passed to expandWithRefs(), or a variable was only partially expanded with no remove processing, the cache could become corrupted. Move the code to getVarFlag making the data lifecycle very clear, meaning other calls to expandWithRefs() cannot corrupt the cache. The expand_cache reset code needs to be moved ahead of any remote data connectors too, since the expand_cache is now on the local side of the connection. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17data_smart: Micro optimise _remove handlingRichard Purdie
This brings _remove handling into line with _append/_prepend with regard to the parsing flag to getVarFlag. This is an internal flag and the only times this is used is through getVar during renameVar operations and when processing ?= operations to see if a variable is set. In either case we don't need to process remove operations. Therefore take the minor speedup and skip processing for parsing=True. [YOCTO #10945] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17fetch2: Avoid incorrect getVarFlag callRichard Purdie
Calling getVarFlag with flag=None makes no sense, don't do it. Bitbake used to silently ignore this, it now warns so avoid the warning. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17bitbake-user-manual: fix description of BB_RUNTASKChris Laplante via bitbake-devel
Contrary to what the manual said, BB_RUNTASK does include the do_ prefix, unlike BB_CURRENTTASK. Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17fetch2/git: provide information about missing sourcesUrs Fässler
Provide more information in the case the sources are not found in the unpack step. Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17fetch2/git: explicitly show the decision logic to select the source in codeUrs Fässler
Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17fetch2/git: prevent access to non-existing clonedirUrs Fässler
A user friendly error is throw when neither the clonedir nor fullshallow exist. Without the check, a difficult to interpret error is throw from within the fetch command. Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17fetch2: extract the function which ensures that a valid symlink existsUrs Fässler
For better readability and future use, we extract the function which ensures that a given symlink exists. Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17fetch2/git: use intention revealing names for premirror testsUrs Fässler
Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17fetch2/git: add tests to capture existing behavior wrt. naming of git ↵Urs Fässler
shallow tarball The mapping of the URLs to the local shallow tarballs is not obvious. For easier understanding, we add this tests to explicitly showing the mapping. Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17fetch2/git: add tests to capture existing behavior wrt. naming of mirror tarballUrs Fässler
The mapping of the URLs to the local tarballs is not obvious. For easier understanding, we add this tests to explicitly showing the mapping. Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17fetch2/git: add tests to capture existing behavior wrt. naming of clone ↵Urs Fässler
directories The mapping of the URLs to the local directory is not obvious. For easier understanding, we add this tests to explicitly showing the mapping. Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17fetch2: avoid circular recursion with SRCPV in PRPeter Marko
Some recent changes broke SRCPV and workaround was introduced to avoid circular dependency if SRCPV is in PV. However there is still the same error if SRCPV is in PR. Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17taskexp: add focused search barTobias Olausson
Searching in the task explorer requires one to focus the task list. A readily visible and focused search bar makes searching intuitive. Signed-off-by: Tobias Olausson <tol@hms.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17layerindexlib: Fix various type checking errorsMark Hatle
In the list_obj function, we can't check if the requested object is 'in', the index data -- as it's actually an attribute of the object. Move to hasattr. The remaining items were incorrect usages of 'type' for class type comparison. Instead move to 'isinstance'. Remaing 'type' comparisons are still valid. The code was also reordered slightly to avoid a lot of: if not isinstance(x, y): ... else: ... reordering it removes the not and makes the code slightly easier to read. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17toaster: missing shutil importDavid Reyna
The "buildimport.py" script is missing the "import shutil" line, which causes a project import page failure. [YOCTO #12959] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17toaster: bump django version to match build toolsDavid Reyna
The version of django in the 2.6 release got bumped to 1.11.14. The toaster requirements file needs to be updated to accept it. [YOCTO #12958] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17toaster: bad link for distro conf fileDavid Reyna
The distro source path link is missing "conf/distro/", and the display is using the machine link instead of the distro link. [YOCTO #12957] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-16data: Fix whitespace on _remove operationsRichard Purdie
We have some slightly odd behaviours with the current implementation of _remove operations. For example: TEST = " A B" TEST_remove = "C" would trigger TEST to become "A B" even thought it doesn't contain "C". In particular, this means that an inactive remove operator added in a bbappend could change the task checksum which is not desireable. Fix the operation to preserve whitespace, adding new tests to make this explict and test further corner cases. Also update the manual to match. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-16data_smart: Preserve history when renaming variablesRichard Purdie
Currently when a variable is renamed, all the variable history is lost. This makes it hard for users to understand/debug where values came from. Improve the code so that history is preserved across renamed variables. (Expanded variable key names are a special case of variable renaming) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-09main: Fix environment handling for UI module importsRichard Purdie
The environment was being cleared before the UI imports occurred which caused problems for graphical UIs like taskexp. The full environment was intended to be available to UI clients and it was only meant to be cleared for the server/cooker, so tweak the code order so this is the case. This fixes problems reported for taskexp. [YOCTO #12670] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-04gitsm: Allow relative URIs when fetchingMark Hatle
Some repositories may specify a relative submodule path. If this happens, it is our responsibility to use the parents URL (ud) and handle any relative processing ourselves. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-04fetch2/gitsm: checkout submodules recursivelyLaurent Bonnans
The new fetcher did not run 'git submodule update' recursively. Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-04fetch2/gitsm: handle submodules nested inside subdirsLaurent Bonnans
The new gitsm fetcher assumed that submodules were living directly in the 'modules' directory, whereas they can be arbitrarily nested inside subdirectories. Solve it by first creating the parent of the destination directory for the symlink and copy steps. Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-04toaster: custom image enable layer add, protect pre-cloned layersDavid Reyna
When creating custom image recipes, the layer add for new layers needs missing xhrLayerUrl data. Also, code is needed to check and inform user if the newly added layer has not been cloned yet, and provide helpful error message instead of the current frozen dialog. [YOCTO #12887] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-04toaster: disable git remote check to allow for firewallsDavid Reyna
Toaster users behind firewalls that block "git" access usually require developers to add remap rules in their "~/.gitconfig" to remap GIT accesses to HTTP* access. However, there is a "git remote" test in Toaster that is not aware of such remaps, resulting in a false error. For now, disable this nice-to-have check to support this release, and re-enable when we can add remapping accommodations for this test. [YOCTO #12944] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>