summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@proton.parabola.nu>2018-07-18 03:32:42 +0100
committerLuke Shumaker <lukeshu@parabola.nu>2019-03-10 01:08:41 -0500
commitfb2b8187a6b41760eeda8f61c3b4abe5b28310aa (patch)
treee06361579327691c87291ad45cfe989f636381c1
parentd8de878ffbe902c0a618ee06dd0d9d92cffdb146 (diff)
reporead: spoof the arch as "any (${tarch})" for arch=(any) packages
https://labs.parabola.nu/issues/1666
-rw-r--r--devel/management/commands/reporead.py2
-rw-r--r--main/fixtures/arches.json36
2 files changed, 38 insertions, 0 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index c97c2384..8f945ba2 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -594,6 +594,8 @@ def read_repo(primary_arch, repo_file, options):
packages_arches[primary_arch.name] = []
for package in packages:
+ if package.arch == 'any':
+ setattr(package, 'arch', 'any (%s)' % primary_arch.name)
if package.arch in packages_arches:
packages_arches[package.arch].append(package)
else:
diff --git a/main/fixtures/arches.json b/main/fixtures/arches.json
index 1ece16c9..3747769c 100644
--- a/main/fixtures/arches.json
+++ b/main/fixtures/arches.json
@@ -25,5 +25,41 @@
"name": "x86_64",
"required_signoffs": 2
}
+},
+{
+ "pk": 4,
+ "model": "main.arch",
+ "fields": {
+ "agnostic": false,
+ "name": "armv7h",
+ "required_signoffs": 1
+ }
+},
+{
+ "pk": 5,
+ "model": "main.arch",
+ "fields": {
+ "agnostic": true,
+ "name": "any (i686)",
+ "required_signoffs": 1
+ }
+},
+{
+ "pk": 6,
+ "model": "main.arch",
+ "fields": {
+ "agnostic": true,
+ "name": "any (x86_64)",
+ "required_signoffs": 1
+ }
+},
+{
+ "pk": 7,
+ "model": "main.arch",
+ "fields": {
+ "agnostic": true,
+ "name": "any (armv7h)",
+ "required_signoffs": 1
+ }
}
]