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

'repoctl update' picks the wrong file if version is the same #51

Closed
PedroHLC opened this issue Jan 7, 2020 · 2 comments
Closed

'repoctl update' picks the wrong file if version is the same #51

PedroHLC opened this issue Jan 7, 2020 · 2 comments
Assignees
Labels
enhancement this could improve the capabilities/design of the program good first issue this is a good issue for starting contributors
Milestone

Comments

@PedroHLC
Copy link

PedroHLC commented Jan 7, 2020

When repoctl update $pkgname is called it picks the wrong and outdate package instead of the newer one, that's happening with my xz->zst transactions. I think modified timestamp should be compared when pkgver and pkgrel are the same.

EDIT: Thinking better about it, modified timestamp should always be preferred, this would solve problems like 1.0.0-rc1 being bigger than 1.0.0.

@PedroHLC PedroHLC changed the title zst: repoctl update picks the wrong file if version is the same 'repoctl update' picks the wrong file if version is the same Jan 7, 2020
@cassava
Copy link
Owner

cassava commented May 31, 2020

Not sure if I agree on the timestamp priority, but it might make sense to make that an option, if it's easy enough to implement. But I do agree that if pkgver and pkgrel are the same, the timestamp should be checked next. (Alphabetically, "xz" is less than "zst", which would explain the current behavior.)

Also, if 1.0.0-rc1 is being sorted higher than 1.0.0, then that would be a proper bug. I'm using a special version comparison function that specifies how versions are to be compared, and it's a little more involved. See https://github.com/cassava/repoctl/blob/devel/pacman/alpm/vercmp.go

@cassava cassava added this to the Version 0.22 milestone Aug 6, 2020
@cassava cassava added the enhancement this could improve the capabilities/design of the program label Aug 6, 2020
@cassava cassava self-assigned this Aug 6, 2020
@cassava cassava added the good first issue this is a good issue for starting contributors label Aug 30, 2020
@PedroHLC
Copy link
Author

This is probably not a problem anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement this could improve the capabilities/design of the program good first issue this is a good issue for starting contributors
Projects
None yet
Development

No branches or pull requests

2 participants