summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-08 11:26:24 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-01-09 02:18:16 +0000
commit1af545d050a9f129e7e42ec6fd2763fd8a3514aa (patch)
tree12b3c7669c0b78182108268871943d831d9030a8 /dgit
parentb77d2fd90d945d937ed3983d139d207ab4e1913e (diff)
dgit: Support distro aliases
We are going to use this to spot when we accidentally look up "debian" information in the test suite. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit8
1 files changed, 7 insertions, 1 deletions
diff --git a/dgit b/dgit
index 3ffcf77..02d0b92 100755
--- a/dgit
+++ b/dgit
@@ -691,7 +691,7 @@ sub cfg {
"$us: distro or suite appears not to be (properly) supported";
}
-sub access_basedistro () {
+sub access_basedistro__noalias () {
if (defined $idistro) {
return $idistro;
} else {
@@ -711,6 +711,12 @@ sub access_basedistro () {
}
}
+sub access_basedistro () {
+ my $noalias = access_basedistro__noalias();
+ my $canon = cfg("dgit-distro.$noalias.alias-canon",'RETURN-UNDEF');
+ return $canon // $noalias;
+}
+
sub access_nomdistro () {
my $base = access_basedistro();
my $r = cfg("dgit-distro.$base.nominal-distro",'RETURN-UNDEF') // $base;