diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-03-19 23:55:15 +0000 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-03-20 15:41:58 +0000 |
commit | 3cc0b78935063291f50a5af350718d20f5d523ab (patch) | |
tree | d4608df68a3f11e0182a762892d064a47c48436c /layerindex/update.py | |
parent | 0a1215e59e926318691f861943fff9c499d375cb (diff) | |
download | openembedded-core-contrib-3cc0b78935063291f50a5af350718d20f5d523ab.tar.gz |
update.py: create dependency/maintainer records when creating LayerBranch
If we're creating a LayerBranch record, it's helpful to copy the
maintainer and dependency records in from master as they're usually
going to be the same; if they're not the user can always change them
afterwards.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/update.py')
-rwxr-xr-x | layerindex/update.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/layerindex/update.py b/layerindex/update.py index 7f1e91f354..a3cda0cf17 100755 --- a/layerindex/update.py +++ b/layerindex/update.py @@ -334,6 +334,17 @@ def main(): if layerbranch_master: layerbranch.vcs_subdir = layerbranch_master.vcs_subdir layerbranch.save() + if layerbranch_master: + for maintainer in layerbranch_master.layermaintainer_set.all(): + maintainer.pk = None + maintainer.id = None + maintainer.layerbranch = layerbranch + maintainer.save() + for dep in layerbranch_master.dependencies_set.all(): + dep.pk = None + dep.id = None + dep.layerbranch = layerbranch + dep.save() if layerbranch.vcs_subdir: # Find latest commit in subdirectory |