hash reordering release names causing flipflop between redhat and centos
cythaletheon opened this issue · 0 comments
Hello
I'm having troubles with the detection of distro - the code is swapping between detecting centos and redhat, and when it decides on centos it can't get the right version info (as machine is redhat).
It appears the issue is in the code fragment that loads the hashes for the original and derived releases - because it's keying to the release value in the Conf.pm, and ignores the second redhat it finds.
(Distribution.pm)
XXX:
my $RELX = sub {
my $master = shift;
my $t = sub {
my($k, $v) = @;
return map { $ => $v} ref $k ? @{$k} : ($k);
};
map { $t->(
grep { $CONF{$_}->{$master} }
keys %CONF
};
my %ORIGINAL_RELEASE = $RELX->('release');
my %DERIVED_RELEASE = $RELX->('release_derived');
#
I'm a bit lost in all the shift references, trying to work out how to use an array instead of the hash for _probe_release. Any chance you'd be in a position to resolve this properly?
Kind Regards,
Damon