Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash reordering release names causing flipflop between redhat and centos #4

Open
cythaletheon opened this issue May 14, 2020 · 0 comments

Comments

@cythaletheon
Copy link

cythaletheon commented May 14, 2020

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->($CONF{$}->{$master}, $ ) }
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant