summaryrefslogtreecommitdiffstats
path: root/bitbake
AgeCommit message (Collapse)Author
2016-02-26bitbake: toaster: change 'delete layer' to 'remove layer'Belen Barros Pena
I have received quite a few complaints about the use of the word 'delete' for layer removal, so change it to 'remove'. That also matches the language we use for packages in image customisation. [YOCTO #9165] (Bitbake rev: 3c5ac2ddfb3f5ecd3f3218de0d6564e5f3842b98) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: rename 'run again' buttonBelen Barros Pena
I quite dislike the 'Run again' label we use in the button that rebuilds things. Changing it to 'Rebuild', which is shorter and more specific. (Bitbake rev: 865a2015e86a1bc5cc7d63308f27c292d1ca98eb) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: fix banner after customimage package addDave Lerner
Correct formatting of the banner message after adding a package to a custom image. [YOCTO #9101] (Bitbake rev: da233005eb8cfa7842cd1a768c16e42aaaa55fad) Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: custom breadcrumb for the default projectBelen Barros Pena
The default "Command line builds" project does not have a Configuration page. It therefore needs a custom breadcrumb where the project name goes to the project builds page, instead of the project configuration page. (Bitbake rev: 5545acf6703a25ee46776138bbbd804615add89c) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: prserv: Add dump_db()Haris Okanovic
Returns a script (string) that reconstructs the state of the entire database at the time this function is called. The script language is defined by the backing database engine, which is a function of server configuration. Returns None if the database engine does not support dumping to script or if some other error is encountered in processing. The SQLite3 implementation in db.py calls iterdump() [1] to generate a script. iterdump() is the library equivalent of the `sqlite3 .dump` shell command, and the scripts are compatible. Execute the script in an empty SQLite3 database using the sqlite3 utility to restore a backup of prserv. Use case: Backup a live PR server database in a non-racy way, such that one could snapshot the entire database after a set of bitbake builds all using a shared server. I.e. All changes made prior to the start of a dump_db() operation should be committed and captured in the script. Subsequent changes made during the backup process are not guaranteed to be captured. Testing: ~7MB database backs up in ~1s while PR server is under load from 32 thread bitbake builds on two separate machines. [1] https://docs.python.org/2/library/sqlite3.html#sqlite3.Connection.iterdump (Bitbake rev: 004003daf6bd0f0233ce5c2d95f1d7d64ab91bb3) Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Reviewed-by: Ken Sharp <ken.sharp@ni.com> Reviewed-by: Bill Pittman <bill.pittman@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: remove custom images from Image RecipesDave Lerner
Fix the view of 'Image Recipes' under 'Configuration' to only show image recipes that are not customised since custom images have their own page. [YOCTO #9111] (Bitbake rev: 18a93b360301a5497d5c8ef74ab71f374f2ad210) Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: show suffix for image files and basename for artifact filesElliot Smith
The build dashboard doesn't show image and artifact files correctly, as it shows the full filename for images and the filename plus path relative to DEPLOY_DIR for artifacts. Instead, show just the suffix for image files, and the basename for artifact files. (Bitbake rev: 8084dcdc283b4dc170f066c202f89d56ce1abbef) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: add missing link to image recipe detailsBelen Barros Pena
In the 'New custom image' page, each image recipe name listed should link to the corresponding image recipe details page, so that users can look into what packages are installed by a certain image, and decide based on that if they want to customise it or not. This patch adds that missing link. (Bitbake rev: a481af693bfef0171732c18c298e285986b82de3) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: adjust the search field widthBelen Barros Pena
The search field at the top of our tables was using one of the Bootstrap classes for text field sizing. Those classes are a bit rigid, resulting in text fields too wide that made other table controls wrap. Setting a maximum width to the search form using one of the span classes, combined with a % width css declaration, make for text fields that adapt a bit better to the horizontal space available in each table. (Bitbake rev: 7833fab2e03f2d9a01ab9ad0a13c190382098b5e) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: make 'configuration' the first tabBelen Barros Pena
Our project pages have 4 tabs: builds, configuration, import layer and new custom image. Even though we treat the 'configuration' as the default tab, it comes second after the builds tab. That's a bit strange: the default tab should be the first one listed. This patch changes the tab order to put 'configuration' first. (Bitbake rev: ccb90019489c2c324c2a5a60295e02280a2ec18f) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: link to configuration in all breadcrumbsBelen Barros Pena
The existing breadcrumb does not always provide a link to the project configuration page. When you are in the build history pages, you must go back to the builds information first, and from there access the project configuration. That feels very long. Change the breadcrumb so that the project name item always provides a link to the project configuration. (Bitbake rev: 9910f3f292d35fc91215d550c5f123dcf18ab35d) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: reduce max height of modal dialogsBelen Barros Pena
Now that we use modal dialogs to display dependency information for packages, we are hitting their maximum height relatively often. It is set by default to 400px, which makes it a bit tight at a 1280x800 viewport size. Reduce the maximum height to 300px to make things a bit more comfortable. (Bitbake rev: e36001d61768979d66cba0f3d4f5a2aaf4af2cb7) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: disable add layer button on clickBelen Barros Pena
The 'add layer' button in the project configuration page remains enabled after you add a layer. If you click it again, the same layer you just added is added again. This patch disables the 'add layer' button on click, to avoid this bit of weirdness. [YOCTO #8905] (Bitbake rev: 63705f60035884a810fdd36e5a3fe10e411f23c7) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: apply error class to name fieldBelen Barros Pena
The form for naming new custom images shows you an error message when the name already exists or you include an invalid character in it. But when an error appears, the input field was missing the red highlight. This patch applies the right class to the form controls whenever an error message is shown. (Bitbake rev: df342e7662179410467c47cd870180ea75f863d4) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: fix custom image name formBelen Barros Pena
The placeholder text in the form where you name your new custom images didn't display fully. This patch fixes the styles so that the text shows properly. It also changes the text itself to make it a bit shorter. [YOCTO #9122] (Bitbake rev: 9df802182b0b96295b148a1681c2265e72d8306b) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: toaster: comment out project release changeBelen Barros Pena
Although the support for building more than one release and how we handle the build directories is the subject of lively discussion, we all seem to agree on removing the ability to change the release of a project. The feature is currently not working but exposed to users, which is not a happy state of affairs. This patch comments out the controls that give access to the release changing functionality to hide them from users, but does not touch anything else. Once all moving pieces start to settle down, we can make a final decision regarding this feature, and clean up the code accordingly. [YOCTO #8917] (Bitbake rev: 3a8c6f7155517cd61a160595b81e7bed84ba4eaf) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: fetch2/npm: Add mirroring support for npm fetcherRichard Purdie
(Bitbake rev: bff46c614d3f9cc18a1c8908c47842712e0e3a8c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: fetch2/npm: Add npm fetcherBrendan Le Foll
npm fetcher with support for shrinkwrap files and lockdown files to easily download and install an npm package with strict dependency resolution. The SRC_URI should be in the format of: SRC_URI = "npm://registry.npmjs.org/;name=${PN};version=${PV}" To add a shrinkwrap and lockdown file use: NPM_SHRINKWRAP := "${THISDIR}/${PN}/npm-shrinkwrap.json" NPM_LOCKDOWN := "${THISDIR}/${PN}/lockdown.json" (Bitbake rev: dec75bbc5d075acb322dad8b1c40d6bd518dc9fd) Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-26bitbake: utils.py: Add sha1_file callBrendan Le Foll
This is useful as npm-lockdown uses sha1 because npm releases the sha1 of packages and whilst this is undocumented it seems no other algorithm is supported (Bitbake rev: fd5d9011f6dd7029895b64d8a02d33185b9aa8ae) Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-19bitbake: toaster: toastergui Fix invalid char test and implementationMichael Wood
This test was passing but because the assertion was the wrong way round and should have expected the first one to pass and second one to fail, in reality both were failing as the method for checking the invalid char was incorrect. (Bitbake rev: 932a92b8130d4815656dc885f0c6e4afa4502022) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-19bitbake: toaster: PackagesTable show only installed packagesMichael Wood
When showing the package list for the image recipe details only show the packages which are installed in the image rather than all the packages which are produced. [YOCTO #9108] (Bitbake rev: be7dca6c7607c0d13151c2d3f7ad7adcdf365076) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-19bitbake: toaster: toastergui unit tests convert to use fixturesMichael Wood
Instead of having to manually write up in the setUp function all the different objects to create in the database, just specifiy them in a fixture and load it. This has the advantage that it can be used on a live server by using the ./manage.py loaddata command and can then be inspected. (Bitbake rev: 8a653ad8b075892d24d15696b3070c5a28a4fbe2) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-19bitbake: toaster: SoftwareRecipesTable apply default order_byMichael Wood
Make sure the default orderby for the SoftwareRecipesTable is applied (Bitbake rev: 1688608b537d8de840c6d1e4802ae41ca872e5bf) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-19bitbake: toaster: orm migrations Sort out migrations messMichael Wood
We messed up the migrations by squashing some of the image customisation model definitions into the initial migration which has meant some irreversible operations on mysql took place. This deletes, re-orders and fixes the migrations. If your schema is up to date you may want to use ./manage migrate with --fake or --fake-initial to avoid re-applying migrations. [YOCTO #9116] (Bitbake rev: 19bd63fc3a28dcbd0f531a5b06a037da34568bac) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18bitbake: data_smart: Drop default expand=False to getVarFlag [API change]Richard Purdie
At some point in the future, getVarFlag should expand by default. To get there from the current position, we need a period of time where the expand parameter is mandatory. This patch starts that process. Clear errors will result from any code which doesn't provide this. Layers can be fixed with an expression like: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, False):g' -i `grep -ril getVar *` (Bitbake rev: aa3faebdf6af66ab34f74d328b2113de0b08c7ee) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18bitbake: data_smart: Drop default expand=False to getVar [API change]Richard Purdie
At some point in the future, getVar should expand by default. To get there from the current position, we need a period of time where the expand parameter is mandatory. This patch starts that process. Clear errors will result from any code which doesn't provide this. Layers can be fixed with an expression like: sed -e 's:\(\.getVar([^,()]*\)):\1, False):g' -i `grep -ril getVar *` (Bitbake rev: fab717d303df0bcef737661f6917f275f35215a4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18bitbake: SignatureGeneratorBasic: make checksum cache file configurableMarkus Lehtonen
Define a new bitbake configuration variable BB_HASH_CHECKSUM_CACHE_FILE that can be used to define the cache file to use for file checksum cache. (Bitbake rev: a965b390d6240e279c190b92b17c0573e9bd604c) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18bitbake: MultiProcessCache: make cache filename configurableMarkus Lehtonen
If no cache file name is given a default from class variable is used, like before. (Bitbake rev: 2602a312818f564961de7dfa63c429d45ff9e5ac) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18bitbake: FileChecksumCache: add get_checksums() methodMarkus Lehtonen
Move the local file checksum functionality from bb.fetch2 into bb.checksum module. (Bitbake rev: 4f60933283f377d68f191db849dac6c1dc7a0aed) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18bitbake: bb/runqueue: save task file dependency cache onto diskMarkus Lehtonen
Before this patch the usage of cache was quite useless as the file checksums were not actually cached on disk but re-calculated every time. This patch utilises the new writeout_file_checksum_cache() method of the SignatureGenerator class to do the job. (Bitbake rev: 5ac9cbf405841ed3f65e6f99a3cee032567fb182) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18bitbake: SignatureGenerator: add method for saving the file checksum cacheMarkus Lehtonen
Extend the API in order to be able to write out the file checksum cache onto disk. SignatureGeneratorBasic class now implements a method that update the fetcher local files checksum cache with the task file dependency checksums. (Bitbake rev: ecdabd321d48fa367b89ebffc00aa525b6eaa95c) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18bitbake: bb/cache: drop some unused argumentsMarkus Lehtonen
Drop unused 'd' argument from the cache save methods, simplifying the API. (Bitbake rev: 81bc1f20662c39ee8db1da45b1e8c7eb64abacf3) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-18bitbake: Allow Hob to run images on a custom simulator, other than qemuMirela Rabulea
The current behavior of Hob is that there is a "Run Image" button which becomes visible only for qemu images. My suggested change is: - if an image is selected and it is qemu-compatible, let the "Run image" button be named "Run qemu image" - if an image is selected and it is not qemu-compatible, let the same button show up with the name "Run custom image", and besides that, an option shows-up to allow the selection of the custom script (by default it points out to runqemu script) to be used for launching this custom image Note: in case there is more than one toggled image (qemu runnable or deployable), when the user clicks the "Run custom image" button, a dialog will be presented, allowing to choose between any of the existing images. [YOCTO #8940] (Bitbake rev: cc4cfc2370297b8feb2dc39d4262e73adf06c09a) Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-16bitbake: bb.ui.knotty: prefix task messages with recipe/taskChristopher Larson
An example prefix: `perl-5.22.1-r0 do_compile:` (Bitbake rev: 792b759e59e31d2e43d525a6e50d866b4f51f072) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-16bitbake: Move bb.{debug,note,..} into their own logging domainChristopher Larson
This lets us filter and use -l to show messages from that source specifically. (Bitbake rev: 7946927156dec33364418988eb921ddb273660eb) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15bitbake: knotty: Set exit failure code on runQueueTaskFailed eventsRichard Purdie
If the worker segfaults, we may never see a TaskFailed event from it, only a runQueueTaskFailed event. In this case, return_value isn't getting set leading to an incorrect exit code from bitbake. Fix by setting return_value in both places. (Bitbake rev: e5dd50e0d95d532fe31dde61f8c6b1a7a72321e9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15bitbake: taskdata: Fix traceback issue with missing providerRichard Purdie
If there is a missing provider and we're using "-k" mode alongside "-w", we could get a traceback since there was no provider. Add tests to avoid this. (Bitbake rev: 90a4805e4e770a433b4394ea99792731e9a4b546) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15bitbake: cooker: Improve cache handlingRichard Purdie
We're seeing issues where the self test, which uses tinfoil doesn't notice the changed contents of include files. The issue is cached_statements in the parser being reused when the files have changed. Whilst looking at this, I realised there were some other issues: * We need to also invalidate the mtime cache when cooker restarts * We should pass full filenames to the file invalidation code * We should process cached_statements as part of inotify invalidation With these fixes, the caching is more reliable for memory resident bitbake too. It does raise some questions about cache validation and lifecycles and indicates bitbake does need more work in the area, preferably with the removal of the globals. This at least highlights and works around some of the current issues. (Bitbake rev: 3f507ff8bc467fba936cf3f31bb8ea8e02f168e8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-12bitbake: Bump version post release to 1.29.0Richard Purdie
(Bitbake rev: da1107a2c2331b3335c7bd46821edcb1933a0ff8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11bitbake: cooker: gracefully shutdown parsersEd Bartosh
CookerParser.shutdown code doesn't do all required work to shutdown parser processes. As a result bitbake hangs if interrupted during parsing. Putting None into the parser_quit queue should fix this issue as it makes parsers to quit main loop. (Bitbake rev: f67307977e8f089ce6d208d3e9de2a6a1768757e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11bitbake: buildinfohelper: unset brbe variable when build finishesElliot Smith
The brbe variable is set on the bitbake server when the Toaster UI starts. This enables Toaster to associate events with the correct build and build environment. However, the brbe variable is also used when a build starts to identify whether a new build needs to be created, or an existing one looked up. This causes a bug for command-line builds which happen after a Toaster-triggered build: because the brbe variable is never unset on the server or the buildinfohelper, the new command-line build events are treated as originating from the previous build. Ensure the brbe variable is reset when the buildinfohelper "closes" a build, so that each build then either sets the brbe variable (Toaster-triggered builds) or leaves it blank (command-line builds). Also modify the localhostbecontroller so that the brbe variable is not set on the server and not looked up from the server. This ensures that it is only set when the triggerBuild() method is called, and that it remains as None for command-line builds. [YOCTO #9021] (Bitbake rev: 4a6a8d0074f62208d843b06344be31ae73d9b745) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11toaster: tests Remove symlinks from toasteruitest folderMihail Stanciu
Remove symlinks in the UI tests folder as they are causing problems for bitbake upstream. [YOCTO #8787] Signed-off-by: Mihail Stanciu <stanciux.mihail@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10bitbake: build: Improve python execution tracebacksRichard Purdie
If something fails in a exec_func_python() the current stack trace shows incorrect filenames and linenumbers. For example: The stack trace of python calls that resulted in this exception/failure was: File: '/media/build1/poky/meta/recipes-sato/images/core-image-sato.bb', lineno: 200, function: <module> 0196: chksum = bb.utils.sha256_file(fn) 0197: f.write('%s\t%s\n' % (chksum, os.path.relpath(fn, baseoutpath))) 0198: 0199: *** 0200:copy_buildsystem(d) 0201: File: '/media/build1/poky/meta/recipes-sato/images/core-image-sato.bb', lineno: 9, function: copy_buildsystem 0005:IMAGE_FEATURES += "splash package-management x11-base x11-sato ssh-server-dropbear hwcodecs" 0006: 0007:LICENSE = "MIT" 0008: *** 0009:inherit core-image 0010: 0011:IMAGE_INSTALL += "packagegroup-core-x11-sato-games" File: '/usr/lib/python2.7/subprocess.py', lineno: 535, function: check_call 0531: The arguments are the same as for the Popen constructor. Example: 0532: 0533: check_call(["ls", "-l"]) 0534: """ *** 0535: retcode = call(*popenargs, **kwargs) 0536: if retcode: 0537: cmd = kwargs.get("args") 0538: if cmd is None: 0539: cmd = popenargs[0] The problem is the use of "FILE" to obtain the current filename. Instead, we therefore inject the function being executed into the methodpool which allows us to correct its linenumber and filename information. We can then clearly mark the initial piece as autogenerated and the rest of the linenumber and filename information should be correct. Afterwards the trace starts: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:copy_buildsystem(d) 0003: File: '/media/build1/poky/meta/classes/populate_sdk_ext.bbclass', lineno: 66, function: copy_buildsystem 0062: import glob 0063: import oe.copy_buildsystem 0064: import subprocess 0065: *** 0066: subprocess.check_call("foo") 0067: 0068: oe_init_env_script = d.getVar('OE_INIT_ENV_SCRIPT', True) 0069: 0070: conf_bbpath = '' File: '/usr/lib/python2.7/subprocess.py', lineno: 535, function: check_call 0531: The arguments are the same as for the Popen constructor. Example: 0532: 0533: check_call(["ls", "-l"]) 0534: """ *** 0535: retcode = call(*popenargs, **kwargs) 0536: if retcode: 0537: cmd = kwargs.get("args") 0538: if cmd is None: 0539: cmd = popenargs[0] We can't inject into methodpool at parsing time, since there may be _append or other override operations against the function before its execution. (Bitbake rev: fae153095d23157dd7e72c29f683f86149ee33a8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10bitbake: build/data: Don't expand python functions before execution [API change]Richard Purdie
Right now, if you have some python code like: X = "a" def somefunction(d): d.setVar("X", "b") d.setVar("Y", "${X}") then any sane person would expect that Y = "b" at the end of the function. This is not the case, Y = "a". This is due to the python function being expanded before execution, the executed code would read d.setVar("Y", "a"). This understandably confuses people, it also makes it near impossible to write ${} in a python function without unintended things happening. I think there is general agreement we should fix this and standardise on non-expansion of python functions. We already don't expand anonymous python (mostly). I've checked OE-Core with buildhistory before and after this change and there were a small number of issues this exposed which I've sent patches for. I propose we default to not expanding python code and then deal with any consequences from that if/as/where identified. This will improve new user understanding and usability of the system, it also allows several long standing weird expansion issues to be fixed. (Bitbake rev: 8bf33a8e92c0e188fa392030025756196c96fcbb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10bitbake: cooker: Don't expand python functions in variable dumpsRichard Purdie
We don't want to expand python functions since they aren't expanded at execution time (e.g. anonymous python). They can also have side effects. This function is primarily used by toaster for variable dumps for later display. The lack of expansion of python functions won't matter in this case and actively helps some variable handling (e.g. SRCPV). (Bitbake rev: 3f5520b4844a4bdd615046479ba08ed192bdc8cd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10bitbake: data: Don't expand python functions for variable dependenciesRichard Purdie
Expanding python functions for variable dependencies doesn't really make sense, not least since this causes execution of any inline python, it also makes it impossible to write expressions like d.expand("${X}") of d.setVar("X", "${Y}") which may have the wrong values if expanded now. This starts to standardise the approach across bitbake for handling python code. (Bitbake rev: 765a2480dbe288f64562a9611dd93b6b6dd0a64e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10bitbake: data_smart: Avoid expanding anonymous python functionsRichard Purdie
We don't expand anonymous python before execution, so nor should we do this when calculating checksums for them. (Bitbake rev: 5f10987edda35b08970a6dd6ccf9febad271ce3e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10bitbake: toaster: models Remove manual transaction control from lsupdatesMichael Wood
Revert "toaster: models.py do not use transactions". This reverts commit e248a503ba84658dea086e65e9cde8b845b9c0ed (Bitbake rev: 48d0d510816346073f135bb86fb7904fdb50bb27) Manually managing the database transactions caused more problems than it temporarily solved so we return control back to Django's orm. [YOCTO #8796] (Bitbake rev: 25c531915b6f8f79a0822996ceb97f90483e359f) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10bitbake: toaster: build section Improve display of builds when > 1 targetsBelen Barros Pena
* Display always the first target in alphabetical order to match what we do in the breadcrumbs and the build dashboard heading * Remove the extra space between the '+' and the additional number of targets * Make sure the tooltip with the full target list takes the Bootstrap tooltip styles * Replace the word 'targets' in the tooltip with 'recipes', since that's how we call build targets everywhere else in Toaster (Bitbake rev: 3b8747d0af4b9164e973940ed97751c951e74110) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10bitbake: toaster: templates make build data breadcrumb consistentBelen Barros Pena
The pages in the build data section of Toaster showed different breadcrumbs: in some pages the machine was displayed, but not in others. For builds with more than one target, some pages showed the first alphabetical target (the correct behaviour), others didn't. This patch removes the inconsistencies, showing exactly the same breacrumb across all pages in the section. The patch also removes the extra space between the '+' and the number of targets when the builds have more than one target. Remove an unneeded debug message (Bitbake rev: 9cdbb543311b6f4a8a88c27fc157d998242444ee) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>