Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected result of koji_util.get_srpm_arches #246

Closed
mizdebsk opened this issue Feb 22, 2018 · 1 comment
Closed

Unexpected result of koji_util.get_srpm_arches #246

mizdebsk opened this issue Feb 22, 2018 · 1 comment

Comments

@mizdebsk
Copy link
Member

When build_arches parameter of koji_util.get_srpm_arches (or corresponding config variable) contains non-canonical arch, get_srpm_arches silently skips that arch.

Reproducer:

import koji
from koschei.backend import koji_util
ks = koji.ClientSession('https://koji.fedoraproject.org/kojihub')
tag_arches = koji_util.get_koji_arches(ks, 'f29-build')
koji_util.get_srpm_arches(ks, all_arches=tag_arches, build_arches=tag_arches, nvra='uboot-tools-2018.03-0.5.rc3.fc29.src')

Expected output:
{'aarch64', 'armv7hl', 'i686', 'ppc64', 'ppc64le', 's390x', 'x86_64'}
Actual output:
{'aarch64', 'ppc64', 'ppc64le', 's390x', 'x86_64'}

Proposed solution 1: make get_srpm_arches raise an exception if non-canonical arch is passed in build_arches
Alternative solution 2: make get_srpm_arches map build_arches to canonical arches

@msimacek Which solution is better in your opinion?

@msimacek
Copy link
Contributor

msimacek commented Mar 1, 2018

I think either is fine. I'd personally prefer to canonicalize the arch (it seems easier)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants