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

Add an arch package #12

Merged
merged 1 commit into from
Jan 21, 2021
Merged

Add an arch package #12

merged 1 commit into from
Jan 21, 2021

Conversation

cgwalters
Copy link
Member

Many users of this package will want to translate between
Go and RPM architectures. This moves code that exists
in coreos-assembler (and can then be deleted from there):
https://github.com/coreos/coreos-assembler/blob/master/mantle/system/arch.go

Many users of this package will want to translate between
Go and RPM architectures.  This moves code that exists
in coreos-assembler (and can then be deleted from there):
https://github.com/coreos/coreos-assembler/blob/master/mantle/system/arch.go
Copy link
Member

@kelvinfan001 kelvinfan001 left a comment

Choose a reason for hiding this comment

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

LGTM!

return m.rpmArch
}
}
return goarch
Copy link
Member

@kelvinfan001 kelvinfan001 Jan 21, 2021

Choose a reason for hiding this comment

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

Maybe this isn't a concern, but would the "pass through" assumption be potentially deceiving? e.g. one would assume whatever comes out of the RpmArch function is definitely an RPM Arch.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's definitely a concern! The downside is that we'd need to maintain an exhaustive list here of all architectures to validate it, I didn't think that was worth the maintenance overhead.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds fair :)

Copy link
Member Author

Choose a reason for hiding this comment

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

A good example is I notice the coreos-assembler code is already missing RISC-V and...honestly I'm not sure if that matches or not. OK looks like the Go arch is riscv64 and the RPM one is (time passes while I dig in links from here) that too! Hooray.

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.

2 participants