[elbe-devel] [PATCH v4 3/6] Add support to specify the architecture on the extra urls mirrors.

Kory Maincent kory.maincent at bootlin.com
Mon Jun 15 15:46:21 CEST 2020


If an extra mirror url contains packages only for a specific architecture,
tell apt to use only this architecture. Use an 'arch' attribute in the url
element of the xml file project desciption.

Signed-off-by: Kory Maincent <kory.maincent at bootlin.com>
---
 elbepack/elbexml.py | 5 ++++-
 schema/dbsfed.xsd   | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
index d6567dd..7e9eadc 100644
--- a/elbepack/elbexml.py
+++ b/elbepack/elbexml.py
@@ -182,8 +182,11 @@ class ElbeXML(object):
                 mirror.append("deb-src [%s] %s %s main" %
                               (' '.join(options), pmirror, self.prj.text("suite")))
 
-            if self.prj.has("mirror/url-list") and not hostsdk:
+            if self.prj.has("mirror/url-list"):
                 for url in self.prj.node("mirror/url-list"):
+                    if 'arch' in url.et.attrib:
+                        options[1] = "arch=%s" % url.et.attrib["arch"]
+
                     if url.has("binary"):
                         mirror.append("deb [%s] %s" %
                                       (' '.join(options), url.text("binary").strip()))
diff --git a/schema/dbsfed.xsd b/schema/dbsfed.xsd
index e3709de..3213342 100644
--- a/schema/dbsfed.xsd
+++ b/schema/dbsfed.xsd
@@ -206,6 +206,13 @@
         </annotation>
       </element>
     </all>
+    <attribute name="arch" type="string" use="optional">
+      <annotation>
+        <documentation>
+          Specify the architecture of the url
+        </documentation>
+      </annotation>
+    </attribute>
     <attribute ref="xml:base"/>
   </complexType>
 
-- 
2.17.1




More information about the elbe-devel mailing list