- die "unsupported Devuan version '$version'\n"
- if $version !~ /jessie|ascii|beowulf|chimaera/;
-
- my $self = { conf => $conf, rootdir => $rootdir, version => $version };
+ # map to Debian version, we sometimes check that
+ my $version_map = {
+ 'jessie' => 8, # Devuan 1.0
+ 'ascii' => 9, # Devuan 2.0
+ 'ascii/ceres' => 9,
+ 'beowulf' => 10, # Devuan 3.0
+ 'beowulf/ceres' => 10,
+ 'chimaera' => 11, # Devuan 4.0
+ 'chimaera/ceres' => 11,
+ };
+ die "unsupported Devuan version '$version'\n" if !exists($version_map->{$version});
+
+ my $self = {
+ conf => $conf,
+ rootdir => $rootdir,
+ version => $version_map->{$version},
+ devuan_version => $version,
+ };