chiark / gitweb /
Make access_basedistro honour $idistro (i.e. make -d work properly again)
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 843c7ec614f36289a3a06526e6a06c666852d598..ae2684b95c485efe91124c1dcf3aa774fd4395bf 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -500,12 +500,19 @@ sub cfg {
        my $dv = $defcfg{$c};
        return $dv if defined $dv;
     }
-    badcfg "need value for one of: @_";
+    badcfg "need value for one of: @_\n".
+       "$us: distro or suite appears not to be (properly) supported";
 }
 
 sub access_basedistro () {
-    return cfg("dgit-suite.$isuite.distro",
-              "dgit.default.distro");
+    if (defined $idistro) {
+       return cfg("dgit-distro.basedistro.distro",
+                  "dgit-suite.$isuite.distro",
+                  'RETURN-UNDEF') // $idistro;
+    } else {   
+       return cfg("dgit-suite.$isuite.distro",
+                  "dgit.default.distro");
+    }
 }
 
 sub access_quirk () {