[dockerfiles PATCH] refresh: Drop MinGW hacks

Andrea Bolognani posted 1 patch 1 week ago
Failed in applying to current master (apply log)
refresh | 37 ++++++++++++-------------------------
1 file changed, 12 insertions(+), 25 deletions(-)

[dockerfiles PATCH] refresh: Drop MinGW hacks

Posted by Andrea Bolognani 1 week ago
Up until now we have had to hardcode some information in our
refresh script, but with the recent improvements to lcitool that's
no longer necessary.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
This patch needs

  https://www.redhat.com/archives/libvir-list/2020-February/msg00409.html

to be merged into libvirt-jenkins-ci.

 refresh | 37 ++++++++++++-------------------------
 1 file changed, 12 insertions(+), 25 deletions(-)

diff --git a/refresh b/refresh
index 5f3f5e3..6b644de 100755
--- a/refresh
+++ b/refresh
@@ -31,22 +31,19 @@ class Dockerfile:
     CROSS = "-cross-"
     SUFFIX = ".zip"
 
-    # PROJECTS is a dictionary of dictionaries.
+    # PROJECTS is a dictionary of lists.
     # The key is the project name, as present in the Dockerfile name and
-    # the value is a dictionary containing the subprojects which the
-    # dependencies should be installed together as the key and their value
-    # being whether they support mingw builds or not.
-    # This hack is needed till the moment libvirt-jenkins-ci treats mingw
-    # builds in the very same way as cross-builds are treated.
+    # the value is a list containing the subprojects which the
+    # dependencies should be installed together as.
     PROJECTS = {
-        "libvirt" : {
-            "libvirt" : True
-        },
-        "libosinfo" : {
-            "libosinfo" : True,
-            "osinfo-db" : False,
-            "osinfo-db-tools" : True
-        },
+        "libvirt" : [
+            "libvirt"
+        ],
+        "libosinfo" : [
+            "libosinfo",
+            "osinfo-db",
+            "osinfo-db-tools",
+        ],
     }
 
     def __init__(self, path):
@@ -91,17 +88,7 @@ class Dockerfile:
             self.os = stem
             self.cross_arch = None
 
-        self.projects = []
-
-        for project in Dockerfile.PROJECTS[project_name]:
-            self.projects += [project]
-            # Fedora 30 is special in that we use it to perform MinGW
-            # builds, so we need to add the corresponding projects as well.
-            # If a specific project needs to have the MinGW variant included,
-            # the corresponding value in the dictionary will be True
-            if (self.os == "fedora-30" and
-                Dockerfile.PROJECTS[project_name][project]):
-                self.projects += [project + "+mingw*"]
+        self.projects = Dockerfile.PROJECTS[project_name]
 
 
     def refresh(self, lcitool):
-- 
2.24.1