chiark / gitweb /
dgit: move suite name check to after suite rmap
authorMatthew Vernon <mv3@sanger.ac.uk>
Fri, 19 Jul 2019 09:13:24 +0000 (10:13 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Jul 2019 21:57:36 +0000 (22:57 +0100)
The Ubuntu Cloud Archive has Codenames of the form
bionic-updates/train (the / in which suitere doesn't match); this can
be corrected by suite rmap, so apply that before doing the suitere
sanity check.

Signed-off-by: Matthew Vernon <mv3@sanger.ac.uk>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 0d7c62d7589a8aa3b1b7bad19d5eef4554792d45..398dad554a0ce631915151d3bd4cb05b57d46e3b 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1435,11 +1435,11 @@ sub canonicalise_suite_aptget {
        my $val = $release->{$name};
        if (defined $val) {
            printdebug "release file $name: $val\n";
+           cfg_apply_map(\$val, 'suite rmap',
+                         access_cfg('aptget-suite-rmap', 'RETURN-UNDEF'));
            $val =~ m/^$suite_re$/o or fail f_
                "Release file (%s) specifies intolerable %s",
                $aptget_releasefile, $name;
-           cfg_apply_map(\$val, 'suite rmap',
-                         access_cfg('aptget-suite-rmap', 'RETURN-UNDEF'));
            return $val
        }
     }