argparse: change --arch to be a single value instead of a string
ClosedPublic

Authored by kparal on Mar 17 2017, 3:03 PM.

Details

Summary

This makes it easier to handle this value in formula and pass it to
other directives (like a bash directive), or modify it (append something
to it).

This is a substantial change. None of existing tasks seem to be making
use of multi-valued ${arch}. Generic tasks usually use 'all' arch value
in koji directive and process everything in one pass. Arch-specific
tasks will mostly want to handle just a single arch in a single pass.
That will also help us keep our sanity.

This patch is helpful for resolving T894 (making depcheck/rpmdeplint a
per-arch task).

Test Plan

tested with rpmdeplint adjusted to be a per-ach task, seems to work fine. Tested with legacy arch: ${arch} in koji directive, also works.

Diff Detail

Repository
rLTRN libtaskotron
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kparal created this revision.Mar 17 2017, 3:03 PM
jskladan requested changes to this revision.Mar 21 2017, 11:17 AM
jskladan added inline comments.
docs/source/writingtasks.rst
123 ↗(On Diff #2982)

Could Bodhi Directive manage both string and list of strings for arch? If not, then change arch to arches to make the "this needs to be a list" intuitive.

This revision now requires changes to proceed.Mar 21 2017, 11:17 AM
kparal updated this revision to Diff 2985.Mar 21 2017, 1:24 PM
  • accept both str and list of str in 'arch' parameters in directives
kparal updated this revision to Diff 2986.Mar 21 2017, 1:26 PM
  • fix docs
This revision is now accepted and ready to land.Mar 21 2017, 1:26 PM
This revision was automatically updated to reflect the committed changes.