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

Avoid a nasty crash if a package has a malformed version string #97

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sheepman4267
Copy link
Member

@sheepman4267 sheepman4267 commented Nov 4, 2024

Python 3 eopkg versions crash badly if a package has a malformed version string, such as 3.0.0d. While we don't want versions formatted like that, it shouldn't crash eopkg completely.

This PR makes that case an error (to alert packagers testing it to the issue), but allows package installation to succeed.

For context, the reason that we're making this case an error is that people on older eopkg 4.x versions will still experience an eopkg crash with a cryptic error message if they encounter malformed version strings.

@ermo ermo force-pushed the fix-version-compare branch 2 times, most recently from 9a6eee4 to e784ad5 Compare December 16, 2024 16:24
@ermo ermo force-pushed the fix-version-compare branch from e784ad5 to 459d5ec Compare December 16, 2024 17:57
pisi/atomicoperations.py Outdated Show resolved Hide resolved
pisi/atomicoperations.py Show resolved Hide resolved
pisi/atomicoperations.py Outdated Show resolved Hide resolved
@ermo ermo self-assigned this Dec 17, 2024
@ermo ermo added this to the Py3 port milestone Dec 17, 2024
Stop mindlessly comparing version numbers that we do not care about; we
exclusively care about the distribution release integer for comparisons.

In addition, update information string output to reflect the above.

Signed-off-by: Rune Morling <[email protected]>
@ermo ermo force-pushed the fix-version-compare branch from 459d5ec to ee88d43 Compare December 17, 2024 13:42
@ermo
Copy link
Contributor

ermo commented Dec 17, 2024

@sheepman4267 Better now?

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