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

Use /etc/os-release for SUSE detection (Adopted) #505

Merged
merged 5 commits into from
Aug 6, 2019

Conversation

clintoncwolfe
Copy link
Contributor

@clintoncwolfe clintoncwolfe commented Aug 6, 2019

This is an adoption of #476, for rebasing. Following is the original PR description.


Description

The file /etc/SuSE-release was deprecated in older SUSE versions and as of SUSE/SLES 15.X is no longer present. This switches the detection to use the values in /etc/os-release.

Related Issue

Fixes #377

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

russellcardullo and others added 5 commits July 11, 2019 16:42
Moves the windows test into it's own block since it's
not part of the set of debian tests.

Signed-off-by: Russell Cardullo <russellcardullo@gmail.com>
The /etc/SuSE-release file was deprecated in older SUSE
versions and as of openSUSE/SLES 15.X is no longer present
on these systems.

This changes the detection methods to use /etc/os-release
which should be present on new as well as older systems.

Signed-off-by: Russell Cardullo <russellcardullo@gmail.com>
Older versions of SUSE won't have the /etc/os-release file
so fallback to the /etc/SuSE-release file in those cases.

Signed-off-by: Russell Cardullo <russellcardullo@gmail.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
@clintoncwolfe clintoncwolfe added Type: Bug Feature not working as expected Platform/UNIX-Like labels Aug 6, 2019
@clintoncwolfe clintoncwolfe requested review from zenspider and miah August 6, 2019 17:32
@codeclimate
Copy link

codeclimate bot commented Aug 6, 2019

Code Climate has analyzed commit 38feb25 and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 3

View more on Code Climate.

Copy link
Contributor

@miah miah left a comment

Choose a reason for hiding this comment

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

Our platform detection code makes me sad, but lets get this in =)

@clintoncwolfe clintoncwolfe merged commit 6cc325a into master Aug 6, 2019
@clintoncwolfe clintoncwolfe deleted the cw/update-suse-detection branch August 6, 2019 17:56
# https://rubular.com/r/xegcPXKEXJrJl5
version = suse[/VERSION *= *("?)([\d\.]{2,})\1$/, 2] if version == ""
# https://rubular.com/r/b5PN3hZDxa5amV
version = suse[/VERSION\s?=\s?"?([\d\.]{2,})"?/, 1] if version == ""
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did this go backwards?

myii added a commit to myii/postgres-formula that referenced this pull request Aug 20, 2019
myii added a commit to myii/postgres-formula that referenced this pull request Aug 20, 2019
myii added a commit to myii/postgres-formula that referenced this pull request Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenSUSE Leap platform detection
4 participants