diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-07 18:45:59 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-08 22:14:48 +0000 |
commit | 76c7db35e2ddaa0c517128fae11cd5893099fffc (patch) | |
tree | d94875cbd4c35b0d9a5d8fadc0f6b848023a8016 /dgit | |
parent | 6df06968cbcb92d2dc9796a137d36cdc873b827a (diff) |
dgit: Enforce a syntax for nominal distros
These appear in various interchange output like tags. They should be
sane. They're going to appear in Dgit: too where people will need to
use them.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -727,7 +727,10 @@ sub access_basedistro () { sub access_nomdistro () { my $base = access_basedistro(); - return cfg("dgit-distro.$base.nominal-distro",'RETURN-UNDEF') // $base; + my $r = cfg("dgit-distro.$base.nominal-distro",'RETURN-UNDEF') // $base; + $r =~ m/^$distro_re$/ or badcfg + "bad syntax for (nominal) distro \`$r' (does not match /^$distro_re$/)"; + return $r; } sub access_quirk () { |