Ignore:
Timestamp:
Aug 8, 2016, 3:57:12 PM (9 years ago)
Author:
dmik
Message:

rpmbuild-bot: Support per-package ARCH specification in -env.sh.

This is to be used to restrict (or enhance) the package list for
specific package needs. One use case is to limit the number of
architectures to one for packages composed from pre-built
binaries (often available for only a single architecture).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rpmbuild-bot/rpmbuild-bot.sh

    r830 r833  
    333333build_cmd()
    334334{
    335   local base_arch="${RPMBUILD_BOT_ARCH_LIST##* }"
     335  eval local arch_list="\${RPMBUILD_BOT_ARCH_LIST_${spec_name}}"
     336  [ -z "$arch_list" ] && arch_list="${RPMBUILD_BOT_ARCH_LIST}"
     337
     338  local base_arch="${arch_list##* }"
    336339
    337340  echo "Spec file: $spec_full"
    338   echo "Targets:   $RPMBUILD_BOT_ARCH_LIST + SRPM + ZIP ($base_arch)"
     341  echo "Targets:   $arch_list + SRPM + ZIP ($base_arch)"
    339342
    340343  sync_aux_src
     
    365368
    366369  # Generate RPMs.
    367   for arch in $RPMBUILD_BOT_ARCH_LIST ; do
     370  for arch in $arch_list ; do
    368371    echo "Creating RPMs for '$arch' target (logging to $log_base.$arch.log)..."
    369372    start_time=$(date +%s)
     
    429432  done
    430433  # Save other arch RPMs.
    431   for arch in ${RPMBUILD_BOT_ARCH_LIST%${base_arch}} ; do
     434  for arch in ${arch_list%${base_arch}} ; do
    432435    rpms="`grep "^Wrote: \+.*\.$arch\.rpm$" "$log_base.$arch.log" | sed -e "s#^Wrote: \+##g"`"
    433436    [ -n "$rpms" ] || die "Cannot find .$arch.rpm file names in '$log_base.arch.log'."
Note: See TracChangeset for help on using the changeset viewer.