Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Panu Matilainen
It should be compatible for legit values of E, V, R. I'm quite positive you can come up with strange behavior differences if you feed it versions containing ':' or '-' though. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Fabian Vogt
Just to make sure, this behaviour change of `rpm.vercmp` in lua is backwards-compatible, right? I would assume so, as any segment is also a valid EVR, but there might be some edge case. Currently we're doing the parsing "by hand" in lua:

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Florian Festi
Merged #1221 into master. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1221#event-3377826189___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Panu Matilainen
Rebased once more with some tweaks to gain support strings in Python labelCompare() essentially for free things like `rpm.labelCompare("1:1.0-1", "2.0-3")` now do the right thing without requiring the painful tuples. -- You are receiving this because you are subscribed to this thread. Reply to

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Panu Matilainen
@pmatilai pushed 2 commits. 953767bf81eded071976026958a7c4c2c8a4e709 fixup! Add Python bindings for the new version API e94232b258e51084254d7d423bd7146f1c546d55 Support EVR strings to Python labelCompare() -- You are receiving this because you are subscribed to this thread. View it on

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Panu Matilainen
Another fixup to avoid multiple reallocations in rpmverEVR(). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Panu Matilainen
@pmatilai pushed 1 commit. dd852a0bf6db9609c34b83e4b614572b8b27b9fd fixup! Add (beginnings of) a rpm version API (parsing, comparison) -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Panu Matilainen
This doesn't actually add any mallocs that were not there before for the busy case of rpmds comparisons: previously the strings were strdup()'ed in rpmdsCompareEVR() before passing to parseEVR(), now this is happens in rpmevr.c instead. The ver handle is all alloced as a single blob so there's

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Panu Matilainen
@pmatilai pushed 1 commit. 0aa1b9778ad3f88b9bb959739e331aebece25988 fixup! Add Python bindings for the new version API -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Florian Festi
Overall this looks good. I am wondering what all the malloc and free costs us as we might do a few version comparisons during a transaction. Probably not enough to actually worry. Converting the EVR of the rpmds object just for comparison seems kinda weird. I am fine with this as a first step

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Florian Festi
Removing the nopromote API in Python but keeping it in C seems inconsistent. Not sure if I really care. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Panu Matilainen
@pmatilai pushed 1 commit. a07ba0f0c5445f7189823bb33ac647a42434d46b Add Python bindings for the new version API -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-27 Thread Panu Matilainen
Rebase to clear fixups. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1221#issuecomment-634485072___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-20 Thread Panu Matilainen
@pmatilai pushed 1 commit. 3df7a55662e71330289d1f60b66b5f2028409a12 fixup! Add (beginnings of) a rpm version API (parsing, comparison) -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-20 Thread Panu Matilainen
@pmatilai pushed 1 commit. 41889b2cc1f4d184bd786deb985232834dd18151 fixup! Add (beginnings of) a rpm version API (parsing, comparison) -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-20 Thread Panu Matilainen
@pmatilai pushed 1 commit. 81e36bc0d3d62542fd11e17bbce326eab1d079a7 fixup! Add (beginnings of) a rpm version API (parsing, comparison) -- You are receiving this because you are subscribed to this thread. View it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)

2020-05-15 Thread Panu Matilainen
This adds a (beginnings of) a version parsing and comparison API to librpmio. Details in the commit messages, but the (obvious) motivation is to finally have a meaningful API for handling rpm versions in and out of rpm. For maximum coverage, this needs to be in librpmio which allows usage from