summaryrefslogtreecommitdiff
path: root/scripts/combo-layer
AgeCommit message (Collapse)AuthorFiles
2014-05-30combo-layer: fix revlist taking into account file_filterJoão Henrique Ferreira de Freitas1
If file_filter is set, git format-patch takes account but git rev-list does not. So revlist is going to get with wrong revisions. And last_revision will be updated with wrong revision. The next time that user run combo-layer it complain about applying patches. So ensure that 'git rev-list' are using file_filter as 'git format-patch'. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28combo-layer: Make directories only if they don't exisit yetSaul Wold1
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-18scipts/combo-layer: Fix check_rev_branch() for cases where the revision is ↵Richard Purdie1
on more than one branch If a revision is in more than one branch, the check_rev_branch() function can't cope with it and the tool returns incorrect errror messages. This patch ensures it copes with this situation. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14scripts/combo-layer: ensure we validate branch/revision on initPaul Eggleton1
If both branch and last_revision are specified for a component when combo-layer init is run, ensure that the specified revision is actually on the specified branch and error out if not. Also ensure that the error message mentions the component. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-14scripts/combo-layer: use last_revision if specified in initPaul Eggleton1
If last_revision is specified for a component when running combo-layer init, then use that revision instead of the latest revision on the branch. Also, remove unnecessary git checkout during init since we specify the revision to all calls to git when dealing with the component repositories. Fixes [YOCTO #3040]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-23scripts/combo-layer: specify branch when getting current revisionPaul Eggleton1
Handle the case during update where the configured branch is not currently checked out in the component repository by just specifying it in the places where it was not previously. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-31combo-layer: ensure init works with split local configPaul Eggleton1
If the local configuration is already split out, ensure the init action works properly and does not error in the case that last_revision is not set. Additionally, if the local configuration is within the repository, prevent it from being committed and add it to .gitignore. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: allow splitting out local configPaul Eggleton1
Allow splitting the local parts of the configuration (mostly local_repo_dir and last_revision, although there is no limitation) to a side-by-side -local.conf file, with component sections optionally tagged with the combo layer branch name. This effectively allows you to: * avoid polluting the history by committing the updated last revision to the combo repository for every update * avoid putting local repo paths into the combo repository * manage multiple branches of the combo repository whilst avoiding the possibility of mixing the configuration for one branch with another. An example split configuration (note, values may be artificial): ------------------- combo-layer.conf ------------------- [bitbake] src_uri = git://git.openembedded.org/bitbake dest_dir = bitbake hook = scripts/combo-layer-hook-default.sh [oe-core] src_uri = git://git.openembedded.org/openembedded-core dest_dir = . hook = scripts/combo-layer-hook-default.sh -------------------------------------------------------- ---------------- combo-layer-local.conf ---------------- [bitbake] local_repo_dir = ../repos/bitbake [oe-core] local_repo_dir = ../repos/oe-core [bitbake|master] branch = master last_revision = db689a99beffea1a285cdfc74a58fe73f1666987 [oe-core|master] branch = master last_revision = 121a1499a81706366acc0081272a6bff634d4d62 [bitbake|denzil] branch = 1.12 last_revision = 24b631acdaa143a4de39c6e1328849660c66f219 [oe-core|denzil] branch = denzil last_revision = 741146fa90f28f7ce8d82ee7f7e254872d519724 -------------------------------------------------------- It is assumed that the local config file will be added to .gitignore. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: check that last_revision is validPaul Eggleton1
If the user edits the configuration file by hand and sets last_revision, we need to ensure that the revision is valid and on the specified branch. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: improve patch list handling and outputPaul Eggleton1
* Ignore blank lines in patch list * Don't fail in interactive mode if patch list is deleted * Show patch counter * Show relative path for patches * Print headings before applying patch list for each component Also change to using a "with" block to read the patch list so it gets closed properly when we're finished. Fixes [YOCTO #2455]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: drop to a shell when apply fails during updatePaul Eggleton1
If applying a patch fails during the update process, drop to a shell instead of exiting; at that point the user can manually apply the patch, do nothing and "exit" to skip it, or "exit 1" to abort the process. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: ignore patch-* temp directories in dirty checkPaul Eggleton1
Make the dirty repo check somewhat less strict by ignoring old patch directories created by this tool. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: allow component pull to be done separatelyPaul Eggleton1
* Add a -n option to disable component repo pull during update * Add a 'pull' action to pull the component repos only Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31combo-layer: remove &> bashismPaul Eggleton1
&> does not work with dash - use > xxxx 2>&1 instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-23scripts/combo-layer: handle diffs in commit messagesPaul Eggleton1
A few recent commits in the OE-Core repository contain diffs in their commit messages, which totally confuses git-am when applying them to the combo repository during update. Add some code to detect and indent any diff text in the commit message so that this does not happen (and show a warning). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-23scripts/combo-layer: limit component repo dirty checkPaul Eggleton1
If one or more components are specified for update, only check if their repository/repositories are dirty rather than checking all of the configured repositories. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-21scripts/combo-layer: allow updating a specific component(s) onlyPaul Eggleton1
If you specify one or more components to update immediately following the "update" command, only these components will be updated as opposed to the default behaviour of updating all of them. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-21scripts/combo-layer: avoid saving last revision if unchangedPaul Eggleton1
If we are running an update and the last revision hasn't changed since the last update, don't write to the configuration file. This avoids committing the config file with no changes other than spontaneous reordering of sections, which sometimes occurs due to the behaviour of the internal dictionary in Python's ConfigParser class. (This can be fixed properly but the fix is only easy in Python 2.7+ due to the availability there of the collections.OrderedDict class, and we currently want to be compatible with 2.6.x as well.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-21scripts/combo-layer: avoid error when config file is outside repoPaul Eggleton1
Avoid displaying the error from the "git status" command we use to check the status of the config file if the config file is outside of the repository (a situation that is already handled). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-07scripts/combo-layer: skip empty commitsPaul Eggleton1
If a commit is empty (for example, commits brought over from svn where only properties were changed) then attempting to apply it with "git am" will result in the error "Patch format detection failed", so skip it instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-11-07scripts/combo-layer: improve some messagesPaul Eggleton1
Fix some grammar. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-11-07scripts/combo-layer: auto-commit updated config filePaul Eggleton1
If the config file is tracked within the combo-layer repository and it is updated at the end of the "update" operation (because last_revision has been changed), then automatically commit the file. This ensures that multiple people can perform updates on different machines without the last revision information going missing. (If the file is outside the repository or is masked via .gitignore, this will do nothing.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-11-07scripts/combo-layer: fix dirty repo checkPaul Eggleton1
Fix the dirty repository check to detect any changes, including untracked files and uncommitted changes in the index. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-11-07scripts/combo-layer: make component repo branch configurablePaul Eggleton1
Add an optional per-component branch setting to allow specifying the branch instead of always using master. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-11-07scripts/combo-layer: tidy up config examplePaul Eggleton1
Move all example configuration to the example config file, tidy up a few long lines and fix some grammar. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-11-07scripts/combo-layer: make init set up initial component dataPaul Eggleton1
The "init" subcommand will now copy the current state of each component repository into the combo layer repository, set last_revision for each component, and then use "git add" to set up the initial commit (but will not actually make the initial commit - that is left up to the user). Also take the opportunity to bump the version number. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-11-07scripts/combo-layer: ignore merge commitsPaul Eggleton1
The combo-layer tool had trouble handling merge commits as they were included in the revision list but not the patches; these are now excluded from the revision list. Note however that this will not handle merge commits that resolved a conflict; since "git format-patch" cannot construct a linear change history over such merges there is nothing we can currently do with these. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-08-23scripts/combo-layer: fix configuration file handlingOtavio Salvador1
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2011-08-11scripts/combo-layer: a simple way to script the combo-layer confLeandro Dorileo1
This small patch introduces a a very simple and basic way to script the combo-layer conf file. With that a combo can be shared with no need to change its config - associated to the use of environment variables for example. *Similar* to bitbake it considers every value starting with @ to be a python script. So local_repo could be easily configured as: [bitbake] local_repo = @os.getenv("LOCAL_REPO_DIR") + "/bitbake" or any more sophisticated python syntax. This version updates the config file description so users can be aware of. Signed-off-by: Leandro Dorileo <ldorileo@gmail.com>
2011-07-27scripts/combo-layer: keep carriage returns at the end of linesPaul Eggleton1
Use --keep-cr option to "git am" or otherwise we lose carriage returns which can be important for patches against files that use CRs. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-07-08combo-layer-tool: add tool to manipulate combo layersYu Ke1
This patch adds the script "combo-layer" to manipulate combo layer repos. A combo layer repo is a repo containing multiple component repos, e.g. oe-core, bitbake, BSP repos. The combo layer repo needs to be updated by syncing with the component repo upstream. This script is written to assist the combo layer handling. The combo layer tool provides three functionalities: - init: when the combo layer repo and component repo does not exist, init will "git init" the combo layer repo, and also "git clone" the component repos - update: combo layer tool will pull the latest commit from component repo upstream, and apply the commits since last update commit to the combo repo. If the user specifies interactive mode(--interactive), they can edit the patch list to select which commits to apply. - splitpatch: split the combo repo commit into separate patches per component repo, to facilitate upstream submission. Combo layer tool uses a config file to define the component repo info. Please check the combo-layer.conf.example for a detailed explanation of the config file fields. Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>