aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2016-01-19python-setuptools: Upgrade to 19.2Alejandro Hernandez
Upgrades python-setuptools to 19.2, easy_install works out of the box adds the package python-plistlib to the manifest as it is needed by setuptools now, and also updates runtime dependencies Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: pylinted ksparser moduleEd Bartosh
Added missing docstrings, fixed wrong indentation and long lines. Final pylint score is 9.89/10 Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: add help for 'include' commandEd Bartosh
Added description of 'include' parser command to the 'wic help kickstart' output. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: move parts of canned .wks into common.wks.incEd Bartosh
In order to give and example of 'include' feature of ks parser and for testing purposes common parts of 3 canned wks files were moved into common.wks.inc Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: implement search of includesEd Bartosh
Used custom argument type to implement search of include .wks files in canned wks paths. Include files can be specified either by full path or by name. [YOCTO #8848] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: refactor get_boot_configEd Bartosh
This function is going to be used by ks parser to find include .wks files. get_boot_config name is a bit confusing as function is quite generic. It looks if file is present in the canned wks directories. Renamed get_boot_config -> get_canned. Renamed parameter file_boot -> file_name. Updated description. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: ksparser: add support for includeEd Bartosh
Extended parser to support inclusion of .ks files: recursively called self._parse to parse included .ks Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: do not remove build dir in source pluginsEd Bartosh
Interesting bug was found during implementation of 'include' parser command. Build directory was removed in do_configure_partition method of bootimg- source plugins. This can cause removal of previously prepared partition images if /boot partition is mentioned after other partitions in .ks file. Moved work directory removal to direct.py before processing partitions. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: use unique partition numberEd Bartosh
This is a preparation for 'include' support. Used unique counter instead of line number for partitions in .ks file. Line numbers can be equal for different .ks files, which can cause problems if one .ks file is included into another. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: move wks parsing code to KickStart._parseEd Bartosh
This is a preparation for implementation of include statement. Parser will be called recursively to parse included .wks files, so it should be available as a method. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19postinst-intercepts: always use set -eRoss Burton
If a postinst has a problem (say, qemu crashes) and set -e isn't in operation, the only mention of the problem is a single line in the rootfs log that doesn't trigger any warnings. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-19recipetool: create: add a couple more license checksumsPaul Eggleton
I found these when I was looking at libftdi and they seem to be generic enough to show up in at least a couple of other packages so I figure I'll add them. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19recipetool: create: add basic support for extracting dependencies from cmakePaul Eggleton
Add support for extracting dependencies from CMakeLists.txt. There's still a bunch of things missing that are outside the scope of OE-Core and we still lack a proper extension mechanism, but this is a good start. This also adds an oe-selftest test to exercise the new code a bit. Implements [YOCTO #7635]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19recipetool: create: force GL libraries to virtual/*Paul Eggleton
We want to specify dependencies on virtual/* rather than whatever library is selected in the current configuration. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19recipetool: create: move dependency mapping code to RecipeHandlerPaul Eggleton
Some refactoring to allow access to the library/header/pkg-config mappings and the DEPENDS / unmapped dependency output code from other classes than AutotoolsRecipeHandler. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19recipetool: create: fix overzealous mapping of git URLsPaul Eggleton
The regex for detecting git URLs was unanchored, leading to it matching where it shouldn't have. An example of where this went wrong was http://taglib.github.io/releases/taglib-1.9.1.tar.gz. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19recipetool: create: support additional autoconf macros from autoconf-archivePaul Eggleton
Support a number of macros from autoconf-archive when reading configure.ac to extract dependencies. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19recipetool: create: detect flex/bison dependencyPaul Eggleton
There are a few different macros that can be used to pick up these tools, add support for them all. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19recipetool: create: pick up boost macros in configure.acPaul Eggleton
The presence of BOOST_REQUIRE or AX_BOOST.* indicates that boost is a dependency. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19recipetool: create: improve extraction of pkg-config / lib depsPaul Eggleton
* The regexes for PKG_CHECK_MODULES / AC_CHECK_LIB were a bit too strict and thus we were skipping some macros. * Add support for PKG_CHECK_EXISTS * Avoid duplicates in warning on missing pkg-config dependencies * Ignore dependency on musl (since this may come up if it's the selected C library) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: rename kickstarter.py -> ksparser.pyEd Bartosh
kickstarter.py was not the best name for this module as previously there was a directory with the same name in scripts/lib/wic/. All files were removed from it, but .pyc files could still stay there causing imports from wic.kickstart to fail with ImportError: cannot import name KickStart. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: override ArgumentParser.errorEd Bartosh
Overriden error method to throw exception instead of printing usage error message. Exception is caught by KickStart code to add .ks file name and line number. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: removed unused importsEd Bartosh
Removed imports of wic.kickstart from plugins as they're not used in the code. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: improve processing of parseing errorsEd Bartosh
Caught argparse.ArgumentError Included .ks file name and line number into the error messages. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: catch KickStartErrorEd Bartosh
Catch parsing errors and output them using msger. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: add custom exception KickStartErrorEd Bartosh
This exception will be raised by kickstart parser on parsing errors and processed in the code which calls parser to produce meaningful error output. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17wic/help.py: document requirements for valid fstab generationJoshua Lock
Without one of the --ondrive, --ondisk or --use-uuid options for a partition with a mountpoint specified the automatically generated fstab entry will be invalid. [YOCTO #8844] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17wic: get rid of 2 gettersEd Bartosh
Used partitions and configfile bootloader attributes instead of using getters get_bootloader_file and get_partitions. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17wic: get rid of set_size and set_source_file settersEd Bartosh
Used size and source_file attributes instead of using setters. It's more pythonic, clear an consistent. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17wic: get rid of get_rootfs and set_rootfsEd Bartosh
Got rid of get_rootfs and set_rootfs java-like getter and setter. Renamed rootfs to rootfs_dir to be consistent with the name of kickstart parameter --rootfs-dir. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17wic: get rid of get_timeout getterEd Bartosh
Used bootloader.timeout instead of kickstart.get_timeout getter. Accessing attributes instead of getting them with getters is more pythonic, shorter and readable. It also more consistent as most of partition and bootloader attributes are used this way. This change also takes care of appendLine bootloader attribute: it's renamed to bootloader.append attribute provided by new parser. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17wic: adjust code for new data structureEd Bartosh
New data structure is less nested than old one. Adjusted bootloader and partitions fields: self.ks.handler.bootloader -> self.ks.bootoader self.ks.handler.partitions -> self.ks.partitions Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17wic: remove pykickstart codeEd Bartosh
Removed pykickstart-related code as it's replaced by new kickstart parser. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17wic: use new kickstart parserEd Bartosh
Used KickStart parser class instead of pykickstart API. This commit breaks wic as data structures and field names provided by new API are a bit different from old ones. This issue will be addressed in the following commits. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17wic: add kickstart parser moduleEd Bartosh
This module will replace existing pykickstart machinery it contains only option used by wic, it's simple and clear. And It will allow to remove a lot of old complex code from 3rdparty/pykickstart/ and kickstart/custom_commands. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17wic: add partition moduleEd Bartosh
Copied partition-related API from kickstart/custom_commands/partition.py to separate module in preparation for removal of all pykickstart related code. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11update_font_cache: only scan system font directoriesRoss Burton
By default fc-cache will scan both system and user directories, which means it attempts to scan $HOME/.fonts. As this is the build host's idea of $HOME this generally doesn't exist, and causes fc-cache to exit with a failure. Solve this by passing --system-only so that fc-cache will only scan system directories, as is appropriate for a rootfs-time invocation. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-11scripts/create-pull-request: fix git request-pull syntaxMartin Jansa
* at least with git 2.6.3 I see git request-pull failing when there is only :{BRANCH} as ending commit * $ git request-pull origin/dizzy git://git.openembedded.org/openembedded-core-contrib jansa/dizzy-backports:jansa/dizzy-backports The following changes since commit 7bb182bdd130266100fc541fd09b82d09c51cd80: build-appliance-image: Update to dizzy head revision (2015-09-29 14:56:04 +0100) ... And finds correct 7 changes there * $ git request-pull origin/dizzy git://git.openembedded.org/openembedded-core-contrib :jansa/dizzy-backports warn: No match for commit 6068d1c90336ddc1fb32856efd1d9ccf07733896 found at git://git.openembedded.org/openembedded-core-contrib warn: Are you sure you pushed 'jansa/dizzy-backports' there? The following changes since commit 97756472d3a69eaca95d105494ffea78c6b077e0: build-appliance-image: Update to dizzy head revision (2014-10-18 16:16:27 +0200) ... and lists all commits in _current_ branch since origin/dizzy, then it refuses to continue, because there are too many changes. * 6068d1c90336ddc1fb32856efd1d9ccf07733896 is this commit in jansa/master-submitted branch so it really shouldn't be included in pull request from jansa/dizzy branch. * git help says: <end> Commit to end at (defaults to HEAD). This names the commit at the tip of the history you are asking to be pulled. When the repository named by <url> has the commit at a tip of a ref that is different from the ref you have locally, you can use the <local>:<remote> syntax, to have its local name, a colon :, and its remote name. * maybe the syntax got changes since git 2.1.0 when Saul added :${BRANCH} * I haven't found how to respect ${COMMIT_ID in the new syntax Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-11populate_sdk_ext: Use new --setscene-only option to bitbake instead of ↵Richard Purdie
workarounds Rather than horrible workarounds, use the new --setscene-only option of bitbake to pre-populate the SDK structures. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11devtool: build: support using BBCLASSEXTENDed namesPaul Eggleton
It's logical that you would want to build BBCLASSEXTENDed items separately through devtool build, so simply allow that - we're just passing the name verbatim to bitbake, so all it means is adjusting the validation. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11devtool: reset: support recipes with BBCLASSEXTENDPaul Eggleton
If the recipe file itself was created in the workspace, and it uses BBCLASSEXTEND (e.g. through devtool add --also-native), then we need to clean the other variants as well. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11devtool: refactor code for getting local recipe filePaul Eggleton
We're doing this in a couple of places, let's just find the recipe file if it exists within the workspace (which it will if it's been added through "devtool add") when we read in the workspace. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11devtool: add: support adding a native variantPaul Eggleton
Sometimes you need to build a variant of a recipe for the build host as well as for the target (i.e. BBCLASSEXTEND = "native"); add a --also-native command line option to "recipetool create" that enables this and plumb it through from an identical option for "devtool add". (We could conceivably do the same for nativesdk, but I felt it might be confusing within the context of the extensible SDK, where nativesdk isn't really relevant to the user.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11devtool: reset: do clean for multiple recipes at once with -aPaul Eggleton
We need to run the clean for all recipes that are being reset before we start deleting things from the workspace; if we don't, recipes providing dependencies may be missing when we come to clean a recipe later (since we don't and couldn't practically reset them in dependency order). This also improves performance since we have the startup startup time for the clean just once rather than for every recipe. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11recipetool: create: support creating standalone native/nativesdk recipesPaul Eggleton
If the recipe name ends with -native then we should inherit native; likewise if it starts with nativesdk- then inherit nativesdk. (Note that the recipe name must actually be specified by the user in order to trigger this - we won't do it based on any name auto-detected from e.g. the tarball name.) Since we're doing this based on the name, "devtool add" will also gain this functionality automatically. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11recipetool: create: lower case name when determining from filenamePaul Eggleton
As a matter of general convention we expect recipe names to be lower case; in fact some of the packaging backends insist upon it. Since in this part of the code we're auto-determining the name, we should convert the name to lowercase if it's not already so that we're following convention and avoiding any validation issues later on. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11devtool: sdk-update: add option to skip preparation stepPaul Eggleton
For debugging purposes it's useful to be able to skip the preparation step so you can inspect what the state of the build system is first. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11devtool: sdk-update: fix error checkingPaul Eggleton
Running "raise" with no arguments here is invalid, we're not in exception handling context. Rather than also adding code to catch the exception I just moved the check out to the parent function from which we can just exit. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11devtool: sdk-update: fix metadata update stepPaul Eggleton
* Clone the correct path - we need .git on the end * Pull from the specified path instead of expecting a remote to be set * up in the repo already (it isn't by default) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11devtool: sdk-update: fix not using updateserver config file optionPaul Eggleton
We read the updateserver setting from the config file but we never actually used that value - the code then went on to use only the value supplied on the command line. Fix courtesy of Dmitry Rozhkov <dmitry.rozhkov@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>