summaryrefslogtreecommitdiffstats
path: root/patches/packetary/0001-deb_driver-Translate-repository.architecture.patch
blob: 18f20015b2934e11cfffb243161d3aeb469f5636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Thu, 27 Oct 2016 22:24:28 +0200
Subject: [PATCH] deb_driver: Translate repository.architecture

When generating repository metadata, the Release file gets the
architecture list in an untranslated format, ending up with
'x86_64' instead of 'amd64'.

Closes-bug: 1638628

Change-Id: I8471db6d54157175ff275c969ed5195d4616fa0f
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 packetary/drivers/deb_driver.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/packetary/drivers/deb_driver.py b/packetary/drivers/deb_driver.py
index ece9fa1..929bdca 100644
--- a/packetary/drivers/deb_driver.py
+++ b/packetary/drivers/deb_driver.py
@@ -409,7 +409,8 @@ class DebRepositoryDriver(RepositoryDriverBase):
         release.setdefault("Description", "The packages repository.")

         keys = ("Architectures", "Components")
-        values = (repository.architecture, repository.section[1])
+        values = (_ARCHITECTURES[repository.architecture],
+                  repository.section[1])
         for key, value in six.moves.zip(keys, values):
             if key in release:
                 release[key] = utils.append_token_to_string(