From fb2b8187a6b41760eeda8f61c3b4abe5b28310aa Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 18 Jul 2018 03:32:42 +0100 Subject: reporead: spoof the arch as "any (${tarch})" for arch=(any) packages https://labs.parabola.nu/issues/1666 --- devel/management/commands/reporead.py | 2 ++ main/fixtures/arches.json | 36 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) 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 + } } ] -- cgit v1.2.2