Fixes: https://pagure.io/koji/issue/3456
In this PR is removed first filter for arches, because arches filter should be used only for build and buildArch methods. taskarch value is used only for rename filename, not for filter.
I found the logic here a bit unnecessarily hard to follow:
if suboptions.all and not (task['method'] in build_methods_list and filetype in rpm_file_types): if filetype != 'log': [handle file 1] elif task['method'] in build_methods_list: if filetype in rpm_file_types: [handle file 2] if filetype == 'log' and suboptions.logs: [handle file 3]
First off, ignoring the log stuff for now, wouldn't the logic about suboptions.all and filetype and task['method'] be clearer if written this way?
if (task['method'] in build_methods_list and filetype in rpm_file_types): [handle file 2] elif suboptions.all and filetype != 'log': [handle file 1]
Secondly, the log stuff again feels sorta the wrong way around. What if we made the whole thing this:
if filetype == 'log': if suboptions.logs: [handle file 3] elif (task['method'] in build_methods_list and filetype in rpm_file_types): [handle file 2] elif suboptions.all: [handle file 1]
If I'm following it right, that's the same logic, but it just seems a lot clearer. WDYT?
I guess that logic isn't really part of the PR, I just happened to get caught on it. So that could be done separately. Aside from that, yeah, the PR looks fine for addressing my issue, if this is how you want to do it.
Metadata Update from @tkopecek: - Pull-request tagged with: testing-ready
rebased onto f017ec28f601de9d0e44729638ee6484dac717ac
Metadata Update from @mfilip: - Pull-request tagged with: testing-done
testing_ready tag was temporary removed to avoid conflicts in testing
Metadata Update from @mfilip: - Pull-request untagged with: testing-ready
Metadata Update from @mfilip: - Pull-request untagged with: testing-done
Metadata Update from @mfilip: - Pull-request tagged with: testing-done, testing-ready
Commit b0ca9984 fixes this pull-request
Pull-Request has been merged by tkopecek
Fixes: https://pagure.io/koji/issue/3456