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

Take endian-ness of the BerkleyDB into account #25

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

bcrochet
Copy link
Contributor

@bcrochet bcrochet commented Jun 24, 2022

Issue #, if available:
#22

Description of changes:
When reading a BDB from a different architecture (for instance, from
s390x), it can have a different byte ordering. In order to read an
RPM db from any architecture on any architecture, we can inspect the
magic number, and if it's in a particular order, we can detect whether
to use BigEndian instead of LittleEndian.

Signed-off-by: Brad P. Crochet brad@redhat.com

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@knqyf263
Copy link
Owner

Thanks for your contribution! Looks like the test is broken. Could you fix it?

When reading a BDB from a different architecture (for instance, from
s390x), it can have a different byte ordering. In order to read an
RPM db from any architecture on any architecture, we can inspect the
magic number, and if it's in a particular order, we can detect whether
to use BigEndian instead of LittleEndian.

Signed-off-by: Brad P. Crochet <brad@redhat.com>
@bcrochet
Copy link
Contributor Author

Thanks for your contribution! Looks like the test is broken. Could you fix it?

Done.

@knqyf263 knqyf263 merged commit 9567012 into knqyf263:master Jun 27, 2022
@knqyf263
Copy link
Owner

Thanks for the great contribution!

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