summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@proton.parabola.nu>2018-07-18 03:32:42 +0100
committerParabolaWeb <parabolaweb@parabola.nu>2018-07-18 03:33:08 +0100
commit6859e7a7c37d455b8fafa18c69e00b7a0a26406e (patch)
tree92f6ae7b7b22edf037a2cdd9de71bc5a35e2c876
parent6bad757aee7950ed7d4884eababd0950fa78cb96 (diff)
reporead: spoof the arch as "any (${tarch})" for arch=(any) packagesparabolaweb-2018-07-18
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 c76b5011..778db370 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -578,6 +578,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
+ }
}
]