Hi, I've pushed two further branches - ubuntucloudnoslash and ubuntucloud_withdefault ; they differ in UI slightly, because I wasn't sure which version you'd prefer
My revised approach is to apply aptget-suite-rmap before testing against suite_re, meaning that suite_re can be left untouched[0], which I think you think is desirable :). This is its own commit, common to both branches. You then end up with csuite names like bionic-updates-train (i.e. [$UbuntuRelease]-[updates|proposed]-[$OpenstackRelease]), which are specified on the command-line as bionic-updates:train [1] since there is no bionic/train (etc), ubuntucloud_withdefault allows you to say bionic:train and get bionic-updates/train ; I think this is a handy shortcut, YMMV :) The attached patch is the tip of ubuntucloud_withdefault against master, mostly so anyone following this bug can see what I mean at least roughly. Regards, Matthew [0] one could test against '[-+.0-9a-z/]+' before applying rmap if you wanted, but I don't think that's necessary? [1] inspired by add-apt-repository cloud-archive:train
diff --git a/dgit b/dgit index 0d7c62d7..61e3914c 100755 --- a/dgit +++ b/dgit @@ -783,6 +783,12 @@ our %defcfg = ('dgit.default.distro' => 'debian', 'dgit-distro.debian-backports.mirror' => 'http://backports.debian.org/debian-backports/', 'dgit-distro.ubuntu.git-check' => 'false', 'dgit-distro.ubuntu.mirror' => 'http://archive.ubuntu.com/ubuntu', + 'dgit-distro.ubuntucloud.git-check' => 'false', + 'dgit-distro.ubuntucloud.nominal-distro' => 'ubuntu', + 'dgit-distro.ubuntucloud.archive-query' => 'aptget:', + 'dgit-distro.ubuntucloud.mirror' => 'http://ubuntu-cloud.archive.canonical.com/ubuntu', + 'dgit-distro.ubuntucloud.aptget-suite-map' => 's#^([^-]+):([^:]+)$#${1}-updates/$2#; s#^(.+)-(.+):(.+)#$1-$2/$3#;', + 'dgit-distro.ubuntucloud.aptget-suite-rmap' => 's#/(.+)$#-$1#', 'dgit-distro.test-dummy.ssh' => "$td/ssh", 'dgit-distro.test-dummy.username' => "alice", 'dgit-distro.test-dummy.git-check' => "ssh-cmd", @@ -1435,11 +1441,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 } }
signature.asc
Description: OpenPGP digital signature