diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-02-26 11:26:00 +0000 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-02-26 11:26:00 +0000 |
commit | d56d280be7ae69ce192c89d56b659df8c481cc7d (patch) | |
tree | a0858654167046f43443620a2112bdc1f4ee1de7 /layerindex/update.py | |
parent | e0f8a0542353a1e03b87bc58370996ba5cce712c (diff) | |
download | openembedded-core-contrib-d56d280be7ae69ce192c89d56b659df8c481cc7d.tar.gz |
Use top commit for subdirectory instead of repository in update script
If there is more than one layer in a repository, we want the latest
commit in the subdirectory not the entire repository (since we use it
to determine the last commit date which should show how "fresh" the
layer is).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/update.py')
-rwxr-xr-x | layerindex/update.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/layerindex/update.py b/layerindex/update.py index 52de4fe2d1..497445a16c 100755 --- a/layerindex/update.py +++ b/layerindex/update.py @@ -286,6 +286,12 @@ def main(): repo = git.Repo(repodir) assert repo.bare == False topcommit = repo.commit('master') + if layer.vcs_subdir: + # Find latest commit in subdirectory + # A bit odd to do it this way but apparently there's no other way in the GitPython API + for commit in repo.iter_commits(paths=layer.vcs_subdir): + topcommit = commit + break layerdir = os.path.join(repodir, layer.vcs_subdir) layerdir_start = os.path.normpath(layerdir) + os.sep |