Skip to content

Fix building on RedHat Enterprise Linux - #7489

Merged
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
adityapatwardhan:FixRHELBuild
Aug 14, 2018
Merged

Fix building on RedHat Enterprise Linux#7489
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
adityapatwardhan:FixRHELBuild

Conversation

@adityapatwardhan

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) commented Aug 9, 2018

Copy link
Copy Markdown
Member

Fix #7485

PR Summary

When trying to build on RHEL, the environment is not recognized as RedHatFamily.
Added detection logic so that appropriate symbolic links are generated.

PR Checklist

Comment thread build.psm1 Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the logic should be more like Fedora with a -ge rather than a -match so we don't have to fix it again

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modelled it after CentOS and others, where we are matching for the VERSION_ID. And since the variable is called IsRedHat7 we may want to revisit when RedHat goes to version 8 anyways.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should have a test at the end of the detection that verifies we matched at least one and throw if we don't.

@dantraMSFT Dan Travison (dantraMSFT) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider detecting that no Linux match was found and throw to protect against future changes.

Comment thread build.psm1 Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should have a test at the end of the detection that verifies we matched at least one and throw if we don't.

When trying to build on RHEL, the environment is not recongnized as RedHatFamily.
Added detection logic so that appropriate symbolic links are generated.
@adityapatwardhan

Copy link
Copy Markdown
Member Author

Travis Plunk (@TravisEz13) Added another property called IsRedHat to future proof the logic.
Dan Travison (@dantraMSFT) Added a throw when none of the environments are set.

@adityapatwardhan

Copy link
Copy Markdown
Member Author

Travis Plunk (@TravisEz13) Ready to merge?

@TravisEz13
Travis Plunk (TravisEz13) merged commit ee33db0 into PowerShell:master Aug 14, 2018
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
When trying to build on RHEL, the environment is not recognized as RedHatFamily.
Added detection logic so that appropriate symbolic links are generated.
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

Successfully merging this pull request may close these issues.

New-PSSession does not find WSMan client library on RHEL72

3 participants