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

Get os_family for RPM distros from the RPM macros #49930

Merged
merged 3 commits into from Oct 9, 2018

Conversation

Projects
None yet
5 participants
@isbm
Copy link
Contributor

commented Oct 8, 2018

What issues does this PR fix or reference?

Bugfix: sometimes uname -m is not what RPM macros returns. Therefore copying cpuarch over osarch is not the best idea, as it results to unwanted effects while installing packages on less used systems (ARM for example).

It is also that original get_osarch function returns bytes type with the os.linesep attached alongside Unicode string.

Tests written?

No, should just apply existing

@isbm

This comment has been minimized.

Copy link
Contributor Author

commented Oct 8, 2018

@rallytime this should be forwarded to develop too.

isbm added some commits Oct 8, 2018

@meaksh

meaksh approved these changes Oct 8, 2018

@brejoc

brejoc approved these changes Oct 8, 2018

Copy link
Member

left a comment

lgtm

@rallytime rallytime closed this Oct 8, 2018

@rallytime rallytime reopened this Oct 8, 2018

@Poil

This comment has been minimized.

Copy link

commented Oct 9, 2018

Why not use the standard platform library from python ? Any case where we have a 32 bit interpreter on a 64 bit OS ?

@isbm

This comment has been minimized.

Copy link
Contributor Author

commented Oct 9, 2018

@Poil because I explained this in the description of the bug: uname -m is what Python's platform is doing and it is cpuarch. And on some platforms it returns different name than RPM database. In other words, osarch and cpuarch may differ. And the bug is when osarch is just copied cpuarch and therefore packages cannot be properly installed anymore.

@rallytime rallytime merged commit a30c053 into saltstack:2018.3 Oct 9, 2018

6 of 10 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has failed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has failed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has failed
Details
WIP ready for review
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.