summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2020-01-18 13:29:23 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2020-01-23 17:06:24 +0100
commitf87ba919a99c5c876c8b05b2a0d3f1c8f6ae7761 (patch)
treee6104f494f7ec13cf647ac7cfcc947ff020da65f
parente323b91841c752b37941be28a06b59525a7d6336 (diff)
Prospective fix for shadertools update deadlock
Shadertools is a dependency of qtquick3d (per yaml file), but it's not in qt5.git yet. So the update ends up with dependency that's never satisfied. The shadertools can't be added to qt5.git yet because it needs an update first. So it's a deadlock. To fix this, allow specifying a product ref in autorun.json for fetching the list of qt5 modules. This set to the change that adds shadertools gives the correct list of modules. Change-Id: I03265dd4023b17d2b2860be2170c81a34c47c5aa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/qtmoduleupdater/autorun.go11
-rw-r--r--src/qtmoduleupdater/autorun.json5
-rw-r--r--src/qtmoduleupdater/main.go4
-rw-r--r--src/qtmoduleupdater/moduleupdatebatch.go1
4 files changed, 16 insertions, 5 deletions
diff --git a/src/qtmoduleupdater/autorun.go b/src/qtmoduleupdater/autorun.go
index 576d4358..03d190f5 100644
--- a/src/qtmoduleupdater/autorun.go
+++ b/src/qtmoduleupdater/autorun.go
@@ -36,8 +36,9 @@ import (
// AutoRunSettings is used to read autorun.json.
type AutoRunSettings struct {
- Version int `json:"version"`
- Branches []string `json:"branches"`
+ Version int `json:"version"`
+ Branches []string `json:"branches"`
+ ProductRefs map[string]string `json:"productRefs"`
}
func (settings *AutoRunSettings) load() error {
@@ -59,7 +60,11 @@ func (settings *AutoRunSettings) runUpdates(gerrit *gerritInstance) {
// I'm keeping the product out of the file
product := "qt/qt5"
for _, branch := range settings.Branches {
- batch, err := newModuleUpdateBatch(product, branch, "")
+ productRef := ""
+ if specificProductRef, ok := settings.ProductRefs[branch]; ok {
+ productRef = specificProductRef
+ }
+ batch, err := newModuleUpdateBatch(product, branch, productRef)
if err != nil {
fmt.Printf("Error loading update batch state for %s/%s: %s\n", product, branch, err)
continue
diff --git a/src/qtmoduleupdater/autorun.json b/src/qtmoduleupdater/autorun.json
index 046f9c03..61a63783 100644
--- a/src/qtmoduleupdater/autorun.json
+++ b/src/qtmoduleupdater/autorun.json
@@ -1,5 +1,8 @@
{
"$schema": "./autorun_schema.json",
"version": 1,
- "branches": ["dev"]
+ "branches": ["dev"],
+ "productRefs": {
+ "dev": "refs/changes/50/286350/5"
+ }
}
diff --git a/src/qtmoduleupdater/main.go b/src/qtmoduleupdater/main.go
index 41fa4b7a..27d68042 100644
--- a/src/qtmoduleupdater/main.go
+++ b/src/qtmoduleupdater/main.go
@@ -98,7 +98,9 @@ func appMain() error {
if autorun {
autorun := &AutoRunSettings{}
- autorun.load()
+ if err := autorun.load(); err != nil {
+ return err
+ }
autorun.runUpdates(gerrit)
return nil
}
diff --git a/src/qtmoduleupdater/moduleupdatebatch.go b/src/qtmoduleupdater/moduleupdatebatch.go
index e65043b2..85488e8f 100644
--- a/src/qtmoduleupdater/moduleupdatebatch.go
+++ b/src/qtmoduleupdater/moduleupdatebatch.go
@@ -171,6 +171,7 @@ func loadTodoAndDoneModuleMapFromSubModules(branch string, submodules map[string
}
func (batch *ModuleUpdateBatch) loadTodoList() error {
+ log.Printf("Fetching %s modules from %s %s\n", batch.Product, batch.Branch, batch.ProductRef)
qt5Modules, err := getQt5ProductModules(batch.Product, batch.Branch, batch.ProductRef)
if err != nil {
return fmt.Errorf("Error listing qt5 product modules: %s", err)