Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
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 GitHub: https://github.com/rpm-software-management/rpm/pull/1221#issuecomment-634633488___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
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: https://build.opensuse.org/package/view_file/Base:System/rpm/rpmsort?expand=1 I'm really looking forward to drop that for good. -- 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-634628732___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
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 Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
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 this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1221#issuecomment-634609663___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
@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 GitHub: https://github.com/rpm-software-management/rpm/pull/1221/files/dd852a0bf6db9609c34b83e4b614572b8b27b9fd..e94232b258e51084254d7d423bd7146f1c546d55 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
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: https://github.com/rpm-software-management/rpm/pull/1221#issuecomment-634583967___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
@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: https://github.com/rpm-software-management/rpm/pull/1221/files/0aa1b9778ad3f88b9bb959739e331aebece25988..dd852a0bf6db9609c34b83e4b614572b8b27b9fd ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
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 no added cost (except for some error checking). As for rpmds and string pool, all good questions that occurred to me too, but I don't have immediate answers. It'd seem attractive to run the rpmds versions through this just for enforced error checking, but then those are in the strpool, and the pool has its own non-trivial cost, and the private pool trick we use elsewhere seems way out of proportion for storing a couple of tiny strings. My excuse for ripping epoch promotion from Python but leaving the ruins in C is basically just that in C, removing would require soname bump, but Python has nothing of the sort. I can certainly put it back there if you prefer. BTW, last fixup added support for python (e,v,r) tuples as a way of creating version objects, I initially pushed the python bindigs a little bit too hastily :) -- 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-634576339___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
@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: https://github.com/rpm-software-management/rpm/pull/1221/files/a07ba0f0c5445f7189823bb33ac647a42434d46b..0aa1b9778ad3f88b9bb959739e331aebece25988 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
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 but we should consider moving the rpmds to use versions from the start. Which asks the question how this relates to rpmsid... That's not something we want to get into right now but we might want to think about in the 4.17 time frame. For now it is great we have something like this at all. -- 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-634563090___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
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: https://github.com/rpm-software-management/rpm/pull/1221#issuecomment-634555607___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
@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: https://github.com/rpm-software-management/rpm/pull/1221/files/e40e2a2e88fd453fca05ebb1cb5d612b0b591b3e..a07ba0f0c5445f7189823bb33ac647a42434d46b ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
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 Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
@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: https://github.com/rpm-software-management/rpm/pull/1221/files/41889b2cc1f4d184bd786deb985232834dd18151..3df7a55662e71330289d1f60b66b5f2028409a12 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
@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: https://github.com/rpm-software-management/rpm/pull/1221/files/81e36bc0d3d62542fd11e17bbce326eab1d079a7..41889b2cc1f4d184bd786deb985232834dd18151 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Add a version parsing and comparison API to librpmio (#1221)
@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: https://github.com/rpm-software-management/rpm/pull/1221/files/9bf0751dfac28bd6118cdf28d7f4541f22a4e229..81e36bc0d3d62542fd11e17bbce326eab1d079a7 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint