mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
update.py: improve fetch failure handling
* Report layer which failed to fetch in error message * Don't retry fetching a repo if it already failed for another layer (where more than one layer is in the same repository) * Exit immediately if all fetches failed Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
714bc8e39f
commit
a490f057d6
2
TODO
2
TODO
|
@ -3,7 +3,6 @@ TODO:
|
||||||
* Duplication of first maintainer when editing to add a second?
|
* Duplication of first maintainer when editing to add a second?
|
||||||
* Try to re-use existing recipe record with same PN instead of deleting and re-creating (if within same layer)
|
* Try to re-use existing recipe record with same PN instead of deleting and re-creating (if within same layer)
|
||||||
* meta-arago-extras is preferred over meta-networking e.g. for crda; probably need an explicit field for priority order
|
* meta-arago-extras is preferred over meta-networking e.g. for crda; probably need an explicit field for priority order
|
||||||
* Update script does not report which layer failed with -q when fetch fails
|
|
||||||
* Document macros for URL fields
|
* Document macros for URL fields
|
||||||
|
|
||||||
Later:
|
Later:
|
||||||
|
@ -12,7 +11,6 @@ Later:
|
||||||
* Ability for reviewers to comment before publishing a layer?
|
* Ability for reviewers to comment before publishing a layer?
|
||||||
* Add link to the all layers and all recipes tables from the layer details page?
|
* Add link to the all layers and all recipes tables from the layer details page?
|
||||||
* Prevent SMTP failures from breaking submission process
|
* Prevent SMTP failures from breaking submission process
|
||||||
* Update script still retries a fetch when repo has already failed
|
|
||||||
* All-branch search/results so you can see version availability of recipes in all branches at once?
|
* All-branch search/results so you can see version availability of recipes in all branches at once?
|
||||||
* Rawrecipes branch support
|
* Rawrecipes branch support
|
||||||
* Display no-results found message when search does not return any results (all tables)
|
* Display no-results found message when search does not return any results (all tables)
|
||||||
|
|
|
@ -233,7 +233,7 @@ def main():
|
||||||
# Handle multiple layers in a single repo
|
# Handle multiple layers in a single repo
|
||||||
urldir = layer.get_fetch_dir()
|
urldir = layer.get_fetch_dir()
|
||||||
repodir = os.path.join(fetchdir, urldir)
|
repodir = os.path.join(fetchdir, urldir)
|
||||||
if not layer.vcs_url in fetchedrepos:
|
if not (layer.vcs_url in fetchedrepos or layer.vcs_url in failedrepos):
|
||||||
logger.info("Fetching remote repository %s" % layer.vcs_url)
|
logger.info("Fetching remote repository %s" % layer.vcs_url)
|
||||||
out = None
|
out = None
|
||||||
try:
|
try:
|
||||||
|
@ -242,11 +242,15 @@ def main():
|
||||||
else:
|
else:
|
||||||
out = runcmd("git fetch", repodir)
|
out = runcmd("git fetch", repodir)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("fetch failed: %s" % str(e))
|
logger.error("Fetch of layer %s failed: %s" % (layer.name, str(e)))
|
||||||
failedrepos.append(layer.vcs_url)
|
failedrepos.append(layer.vcs_url)
|
||||||
continue
|
continue
|
||||||
fetchedrepos.append(layer.vcs_url)
|
fetchedrepos.append(layer.vcs_url)
|
||||||
|
|
||||||
|
if not fetchedrepos:
|
||||||
|
logger.error("No repositories could be fetched, exiting")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
logger.info("Fetching bitbake from remote repository %s" % settings.BITBAKE_REPO_URL)
|
logger.info("Fetching bitbake from remote repository %s" % settings.BITBAKE_REPO_URL)
|
||||||
if not os.path.exists(bitbakepath):
|
if not os.path.exists(bitbakepath):
|
||||||
out = runcmd("git clone %s %s" % (settings.BITBAKE_REPO_URL, 'bitbake'), fetchdir)
|
out = runcmd("git clone %s %s" % (settings.BITBAKE_REPO_URL, 'bitbake'), fetchdir)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user