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

Set the main mode of operation:

  • download: download a single build
  • download_tag: download all builds belonging to a Koji tag
  • download_latest_stable: download the latest build (of the same package you provide in koji_build) that is currently in stable Fedora repositories (main or updates repo). If there's no such build, do nothing.

str

  • download

  • download_tag

  • download_latest_stable

arch

yes

an architecture (or a list of architectures) for which to download RPMs for the requested build/tag. If you want to download RPMs for all Taskotron-supported arches, use 'all'. If you don't want to download any binary arch (i.e. you're only interested in SRPMs, which is controlled by src option), use an empty list [].

Note: noarch RPMs are always automatically downloaded unless arch=[], or you specifically exclude them using arch_exclude. Also, if you specify base arches (like i386), all concrete binary arches for that base arch will be automatically added (e.g. i[3-6]86).

str or list of str

  • supported architectures

  • all

arch_exclude

no

an architecture (or a list of architectures) to exclude from downloading (overrides arch value). You can use it to exclude some specific archicture while using arch='all'. Example: ['armhfp', 'noarch']

str or list of str

  • supported architectures

build_log

no

download also build.log files for each requested architecture (the files will be saved as build.log.<arch>). Note that some logs can be already deleted in Koji and might not be available for download. Such missing logs will be skipped. This option will be considered only for single build downloads (i.e. action='download' or action='download_latest_stable').

bool

False

    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

            yes

            directory into which to download builds. It gets created if it doesn't exist.

            str


              Return Values

              A dictionary containing following items:

              • downloaded_rpms: (list of str) a list of absolute paths of the downloaded RPMs
              • downloaded_logs: (list of str) a list of absolute paths of the downloaded build logs
              • log_errors: (list of str) a list of architectures for which the build.log could not be downloaded

              Exceptions