| |
@@ -6950,9 +6950,9 @@
|
| |
build_methods_list = ['buildArch', 'build']
|
| |
rpm_file_types = ['rpm', 'src.rpm']
|
| |
for task in list_tasks:
|
| |
- taskarch = task['arch']
|
| |
+ taskarches = (task['arch'], task['label'])
|
| |
task_id = str(task['id'])
|
| |
- if len(suboptions.arches) == 0 or taskarch in suboptions.arches:
|
| |
+ if len(suboptions.arches) == 0 or any(tarch in suboptions.arches for tarch in taskarches):
|
| |
files = list_task_output_all_volumes(session, task["id"])
|
| |
for filename in files:
|
| |
if filename.endswith('src.rpm'):
|
| |
In 6713d16 , filtering by task
arch was added to
download-task
when--arch
is passed -previously, it didn't bother filtering the tasks themselves by
arch, only any files they produce.
This introduces some problems. The most obvious one is that the
'task arch' for noarch package builds is not 'noarch' but
'whatever the arch of the builder is' - e.g. for task
90635802 , which is a noarch build, the arch is 's390x'.
Another problem would be with i386 vs. i686: for builds that
produce i686 RPMs, the task arch is i386. So in order to get
i686 packages, you'd have to pass `--arch=i386 --arch=i686".
Fortunately, the task "label" seems tailor-made to solve these
problems: when it's a noarch build, the label is "noarch", and
when it's an i386/i686 build, the label is "i686". So by just
including the task if its arch or its label is in the arches
passed on the command line, we resolve both those problems, and
hopefully any other similar ones.
Another option here would be just to ditch the arch filter and
go back to considering all tasks and only filtering files, but
this seems more efficient if it's safe in all cases.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2116674
Signed-off-by: Adam Williamson awilliam@redhat.com