Skip to content

Conversation

@frival
Copy link
Contributor

@frival frival commented Aug 14, 2025

Description

Add SLES as a valid target for detect_os

Before/After Comparison

Before: detect_os will error out on SLES systems that 'sles' is not a known OS and tests will abort
After: SLES is properly identified and tests run to completion

Clerical Stuff

This closes #84

Relates to JIRA: RPOPC-569

@frival frival linked an issue Aug 14, 2025 that may be closed by this pull request
@github-actions
Copy link

This relates to RPOPC-569

dvalinrh
dvalinrh previously approved these changes Aug 14, 2025
Copy link
Contributor

@dvalinrh dvalinrh left a comment

Choose a reason for hiding this comment

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

LGTM

@dvalinrh dvalinrh added the group_review_lgtm Indicates approval after a group review meeting label Aug 14, 2025
detect_os Outdated
elif command -v apt > /dev/null 2>&1; then
apt install -y wget
else
zypper install -y wget
Copy link
Member

Choose a reason for hiding this comment

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

Fix indent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The file seems to have some inconsistent indents, some tabs, some spaces, some mixed. In vim it's actually lined up properly. I'll just cut-n-paste the apt line to get the right indentation but someone else can go fix anything else that's wonky.

detect_os Outdated
continue
fi

if [ -z pattern ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this start with a $?

So this:

Suggested change
if [ -z pattern ]; then
if [ -z "$pattern" ]; then

I think the uname pattern has the same problem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it looked wrong as well but as you said the uname pattern is wrong and I was just copying what was there assuming it was correct. Want me to fix both at the same time or leave the other so as to not mix issues in the same push?

Copy link
Member

Choose a reason for hiding this comment

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

Go ahead and fix both, no reason to delay this small of a fix/bug

Copy link
Member

@kdvalin kdvalin left a comment

Choose a reason for hiding this comment

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

We should really remove the entirety of the package installation from this, to be discussed at a later meeting

detect_os Outdated
Comment on lines 65 to 66
else
zypper install -y wget
Copy link
Member

Choose a reason for hiding this comment

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

Add error message

Suggested change
else
zypper install -y wget
elif command -v zypper > /dev/null 2>&1; then
zypper install -y wget
else
echo "Missing wget, and do not know what package manager is used, exiting out"
exit 1
fi

frival added 2 commits August 19, 2025 18:49
…r message if we can't figure out which package manager to use.
Copy link
Member

@kdvalin kdvalin left a comment

Choose a reason for hiding this comment

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

LGTM

@frival frival merged commit f7bc67e into main Aug 20, 2025
8 checks passed
@frival frival deleted the 84-add-support-for-sles-to-detect_os branch August 20, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group_review_lgtm Indicates approval after a group review meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for SLES to detect_os

4 participants