#15498 closed bug (fixed)
hardlink_packages.py misorders versions of any arch packages sometimes
Reported by: | kallisti5 | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta2 |
Component: | Build System | Version: | R1/Development |
Keywords: | hardlink | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
hardlink_packages.py will mis-parse versions sometimes resulting in unexpected results.
Example:
- Take https://git.haiku-os.org/haiku/commit/build/jam/repositories/HaikuPorts/arm?id=81afd20b2131a3f6941e086f7a6ff1aa67237065
- Bump gnu_efi_kernel from 3.0.9-1 to 3.0.10-1.
Leverage hardlink_packages.py, and provide a source package pool with gnu_efi_kernel 3.0.9-1 and 3.0.10-1.
hardlink_packages.py will silently adjust the arm repo back to use 3.0.9 instead of 3.0.10.
I'm assuming the parsing of 9 > 1.
Workaround is to select just the packages you want for the source pool, and remove older packages from it.
Attachments (1)
Change History (6)
by , 5 years ago
Attachment: | hardlink-test.tar.gz added |
---|
comment:1 by , 5 years ago
comment:2 by , 5 years ago
I would think haikuporter has a more accurate version comparison algorithm "ritten in python? In't more complex than you'd think with the ~beta, etc things
comment:3 by , 5 years ago
version compare from HaikuPorter: https://github.com/haikuports/haikuporter/blob/b0f8ba3f116c235b802102f5f7f7f9179bcfba00/HaikuPorter/Utils.py#L269
comment:4 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
As this is only a problem when pointing the hardlink_packages tool at its own packages directory, and not the actual package repository, I just used distutils' version comparator. Fixed in hrev54063.
comment:5 by , 5 years ago
Milestone: | Unscheduled → R1/beta2 |
---|
Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone
Problem is in line 66. A dirty hack can be to replace this block:
With something like this:
In other words, attempt to compare the strings converted to integers and if conversion is not possible then do it as it was done before (wrong, but you still get something).