koji_directive - download builds and tags from Koji

New in version 0.4.

The koji directive interfaces with Koji to facilitate various Koji actions. You can either download all RPMs from a specific build, or you can download all RPMs from all builds belonging to a specific Koji tag.

Parameters

parameter required description type default choices

action

yes

choose whether to download a single build (download value) or all builds belonging to a Koji tag (download_tag value)

str

  • download

  • download_tag

  • download_latest_stable

arch

yes

a list of architectures for which to download RPMs for the requested build/tag. If you want to download RPMs for all arches, use ['all'].

Note: noarch RPMs are always automatically downloaded even when not requested, unless arch=[] and src=True.

list of str

  • supported architectures

  • ['all']

debuginfo

no

download also debuginfo RPM files

bool

False

    koji_build

    yes

    N(E)VR of a Koji build to download (for action="download") or to search the latest stable build for (for action="download_latest_stable"). Not required for action="download_tag". Example: xchat-2.8.8-21.fc20

    str

      koji_tag

      yes

      name of a Koji tag to download all builds from. Only required when action="download_tag". Example: f20-updates-pending

      str

        src

        no

        download also src RPM files

        bool

        False

          target_dir

          no

          directory into which to download builds

          str

          ${workdir}

            Return Values

            A dictionary containing following items:

            • downloaded_rpms: (list of str) a list of local filenames of the downloaded RPMs

            Exceptions

            Examples

            Rpmlint needs to download a specific build from Koji, all architectures including src.rpm:

            - name: download rpms from koji
              koji:
                action: download
                koji_build: ${koji_build}
                arch: ['all']
                src: True
            

            Depcheck needs to download all builds in a specific Koji tag for the current architecture:

            - name: download koji tag
              koji:
                  action: download_tag
                  koji_tag: ${koji_tag}
                  arch: ${arch}
                  target_dir: ${workdir}/downloaded_tag/
            

            Abidiff needs to download the latest stable build of a package:

            - name: download rpms of the latest stable build of a given build from koji
              koji:
                  action: download_latest_stable
                  koji_build: ${koji_build}
                  arch: ${arch}
                  target_dir: ${workdir}/stable/