aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/update.py
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-05-19 01:09:36 -0700
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-07-21 08:15:53 +0200
commitf6cb14678bbcdc17161c46ac951cab9d891754e7 (patch)
tree101ee57ba3e1d6ab364d836e23b5c78b8c8e6adb /layerindex/update.py
parentb478ff069e6d5e57ae6ae8bfd69ef7b476bf7ffb (diff)
downloadopenembedded-core-contrib-f6cb14678bbcdc17161c46ac951cab9d891754e7.tar.gz
openembedded-core-contrib-f6cb14678bbcdc17161c46ac951cab9d891754e7.tar.bz2
openembedded-core-contrib-f6cb14678bbcdc17161c46ac951cab9d891754e7.zip
update.py: add -p to git fetch
-p, --prune Before fetching, remove any remote-tracking references that no longer exist on the remote. Fixed: $ git push origin :test_branch $ ./update.py The test_branch was still in fetched local repo which was incorrect, it should be gone since it has been removed by upstream. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/update.py')
-rwxr-xr-xlayerindex/update.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/layerindex/update.py b/layerindex/update.py
index f8e5a37a9f..2d578df8a7 100755
--- a/layerindex/update.py
+++ b/layerindex/update.py
@@ -264,7 +264,7 @@ def main():
if not os.path.exists(repodir):
out = utils.runcmd("git clone %s %s" % (layer.vcs_url, urldir), fetchdir, logger=logger, printerr=False)
else:
- out = utils.runcmd("git fetch", repodir, logger=logger, printerr=False)
+ out = utils.runcmd("git fetch -p", repodir, logger=logger, printerr=False)
except subprocess.CalledProcessError as e:
logger.error("Fetch of layer %s failed: %s" % (layer.name, e.output))
failedrepos[layer.vcs_url] = e.output
@@ -279,7 +279,7 @@ def main():
if not os.path.exists(bitbakepath):
out = utils.runcmd("git clone %s %s" % (settings.BITBAKE_REPO_URL, 'bitbake'), fetchdir, logger=logger)
else:
- out = utils.runcmd("git fetch", bitbakepath, logger=logger)
+ out = utils.runcmd("git fetch -p", bitbakepath, logger=logger)
if options.actual_branch:
update_actual_branch(layerquery, fetchdir, branches[0], options, update_bitbake, bitbakepath)