Skip to content

BUGFIX KernelVersion compare __lt__#150

Merged
ukablan-wpc merged 1 commit into
mainfrom
bugfix-ukablan-kernel_version_compare_lt-PAUX-7106
Jun 18, 2026
Merged

BUGFIX KernelVersion compare __lt__#150
ukablan-wpc merged 1 commit into
mainfrom
bugfix-ukablan-kernel_version_compare_lt-PAUX-7106

Conversation

@ukablan-wpc

Copy link
Copy Markdown
Contributor

No description provided.

@ukablan-wpc ukablan-wpc requested review from SandakovMM and lucer June 17, 2026 16:51
Comment thread pleskdistup/common/src/version.py
@ukablan-wpc ukablan-wpc force-pushed the bugfix-ukablan-kernel_version_compare_lt-PAUX-7106 branch from f82a490 to c496311 Compare June 18, 2026 10:50
Comment on lines +119 to +121
vers = ["4.18.0-553.134.1.el8_10.x86_64", "3.10.0-1160.119.1.el7.x86_64", "3.10.0-1160.80.1.el7.x86_64"]
maxkernel = max([version.KernelVersion(v) for v in vers])
self.assertEqual(maxkernel, version.KernelVersion("4.18.0-553.134.1.el8_10.x86_64"))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Weird enough this doesn't fail:

        k1 = version.KernelVersion("3.10.0-1160.80.1.el7.x86_64")
        k2 = version.KernelVersion("3.10.0-1160.119.1.el7.x86_64")
        k3 = version.KernelVersion("4.18.0-553.134.1.el8_10.x86_64")
        self.assertLess(k2, k3)
        self.assertLess(k1, k3)
        self.assertLess(k1, k2)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Found minimal test with >=

@ukablan-wpc ukablan-wpc force-pushed the bugfix-ukablan-kernel_version_compare_lt-PAUX-7106 branch from c496311 to 4b1c226 Compare June 18, 2026 10:54
@ukablan-wpc ukablan-wpc requested a review from SandakovMM June 18, 2026 10:58
@ukablan-wpc ukablan-wpc force-pushed the bugfix-ukablan-kernel_version_compare_lt-PAUX-7106 branch from 4b1c226 to d2f004d Compare June 18, 2026 11:10
@ukablan-wpc ukablan-wpc merged commit 60b97a2 into main Jun 18, 2026
6 checks passed
@ukablan-wpc ukablan-wpc deleted the bugfix-ukablan-kernel_version_compare_lt-PAUX-7106 branch June 18, 2026 12:40
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