diff --git a/VARIABLES.md b/VARIABLES.md index 32f88c06..364a8618 100644 --- a/VARIABLES.md +++ b/VARIABLES.md @@ -88,6 +88,7 @@ These variables should be set when tests are scheduled (when running `isos post` | `ADVISORY` | A Bodhi update ID. If set, the 'update testing' flow will be used: post-install tests will be run with the packages from the update, starting from the stable release base disk images | | `DISTRI` | contains distribution name (should be same as in WebUI, probably `fedora`) | | `VERSION` | contains version of distribution | +| `DEVELOPMENT` | set for update tests if the update is for a development release (not a stable release) | | `FLAVOR` | indicates what type of distribution is used. Three Pungi properties, joined with `-`: `variant`, `type`, and `format`. e.g.: `Server-dvd-iso`. Special value `universal` is used to schedule the group of tests that should be run once each per arch per compose, against the 'best' available ISO | | `ARCH` | is set to architecture that will be used (`x86_64`, `i686`) | | `BUILD` | contains Pungi compose_id (something like `Fedora-24-20160121.n.3`) | diff --git a/lib/utils.pm b/lib/utils.pm index eb86a69b..c0f51cca 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -304,10 +304,20 @@ sub _repo_setup_updates { # Appropriate repo setup steps for testing a Bodhi update # Check if we already ran, bail if so return unless script_run "test -f /etc/yum.repos.d/advisory.repo"; - # Use baseurl not metalink so we don't wind up timing out getting - # metadata from a slow source...baseurl will always give us dl - # in infra + # Use baseurl not metalink so we don't hit the timing issue where + # the infra repo is updated but mirrormanager metadata checksums + # have not been updated, and the infra repo is rejected as its + # metadata checksum isn't known to MM assert_script_run "sed -i -e 's,^metalink,#metalink,g' -e 's,^#baseurl,baseurl,g' /etc/yum.repos.d/fedora*.repo"; + # Fix URL for fedora.repo if this is a development release + # This is rather icky, but I can't think of any better way, really + # The problem here is that the 'baseurl' line in fedora.repo is + # always left as the correct URL for a *stable* release, we don't + # change it to the URL for a Branched release while the release is + # Branched, as it's too much annoying package work + if (get_var("DEVELOPMENT")) { + assert_script_run "sed -i -e 's,/releases/,/development/,g' /etc/yum.repos.d/fedora.repo"; + } # Set up an additional repo containing the update packages. We do # this rather than simply running a one-time update because it may # be the case that a package from the update isn't installed *now*