chiark / gitweb /
dgit: Support distro aliases
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 3ffcf77a7198501037d8566ee8a96722b2ef2b58..02d0b9298e3c8d9d7f5acae491f39b6099d8fbc4 100755 (executable)
--- 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;