Re: [Rpm-maint] [rpm-software-management/rpm] Add rpm-sort utility for sorting RPM versions (PR #2249)
Could not quite bring myself to just say no. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249#issuecomment-1327216695 You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
Merged #2249 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249#event-7891355010 You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
> Yes it happens a lot, in one highly specific corner. Which is often best > served by having that specific corner handle it because it has its own > wrinkles that do not apply elsewhere, like version comparing the name here. > > In principle, Debian versioning isn't _that_ different from rpm. If 'sort -V' > is good enough (if not perfect) for them then it should be close enough for > government work for us too. Not that I have looked at the details, maybe the > details differ more than it seems on the outset. > It works accidentally. If `~` is used, it doesn't sort downward (which dpkg and rpm support). And of course, rpm has `^` now, which `sort -V` definitely doesn't know. I'd rather have an `rpmsort` that I could call directly... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249#issuecomment-1318607855 You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
@frozencemetery Can you change `Also-authored-by` to `Co-authored-by`? The latter is the generally recognized "magic tag" by Git commit processing automation. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249#issuecomment-1318604927 You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
Yes it happens a lot, in one highly specific corner. Which is often best served by having that specific corner handle it because it has its own wrinkles that do not apply elsewhere, like version comparing the name here. In principle, Debian versioning isn't *that* different from rpm. If 'sort -V' is good enough (if not perfect) for them then it should be close enough for government work for us too. Not that I have looked at the details, maybe the details differ more than it seems on the outset. Note that in rpm >= 4.16 you can also perform version comparisons from the cli with boolean expressions, eg > [pmatilai︎localhost ~]$ rpm --eval '%[v"1.0-1" < v"2.0-1"]' 1 [pmatilai︎localhost ~]$ rpm --eval '%[v"3.0-1" < v"2.0-1"]' 0 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249#issuecomment-1298567361 You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
Thanks for the review; updated. > It's not a particularly common use-case AFAICS. Well, depends on how you define "common", I suppose - it gets called every time a new kernel is installed, which is pretty common :) > Still, not convinced this needs to be in rpm. I'm not seeing a better place for it - are you? It doesn't belong in grub or kernel-install because adding a build dependency on RPM doesn't make sense upstream. It doesn't belong in rpmdevtools because it needs to be installed on every system and that isn't. Pretty much all it does is provide a shell interface to a function from librpm. Looking at other systems for precendent, a tool like this generally isn't needed because `sort -V` is good enough - e.g., on Debian. Even so, the comparison functionality at least is exposed by the core tool (`dpkg --compare-versions`). -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249#issuecomment-1297417160 You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
@frozencemetery pushed 1 commit. b04fc4d2775470b659801252bd6ca87ccf36f03c Add rpmsort utility for sorting RPM versions -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249/files/b2e6455060f8d4566eed5188e26f4d58c8183427..b04fc4d2775470b659801252bd6ca87ccf36f03c You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
Yeah there *are* use-cases, such as figuring out the order of stuff in a directory. Still, not convinced this needs to be in rpm. But assuming for a moment we were to merge this, there are some issues to sort (pun not intended) out: - this belongs to tools/ rather than the top-level directory - rpm tools do not have dash in the name, eg it should be called 'rpmsort' - use of alloca() is prohibited - it should use rstrndup() rather than manual malloc+strncpy, possibly other cases where rpm has string helpers - rpmvercmp() on package name seems dubious, the name does not take part in version comparison and rpmvercmp() is known to return 0 for very obviously different strings -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249#issuecomment-1296800054 You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
> I can see how grub* needs such a thing, but I don't really see why this > should be in rpm itself. It's not a particularly common use-case AFAICS. I had to hand-roll something similar when figuring out which was the most recent VM kernel package I had installed in my dom0. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249#issuecomment-1296733767 You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
I can see how grub* needs such a thing, but I don't really see why this should be in rpm itself. It's not a particularly common use-case AFAICS. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249#issuecomment-1296722814 You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
(CI was broken with 190354cb19af6ecdfec6f7eaa454d6afcf381128, hence the revert commit.) -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249#issuecomment-1294023025 You are receiving this because you are subscribed to this thread. Message ID: ___ 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 rpm-sort utility for sorting RPM versions (PR #2249)
@frozencemetery pushed 2 commits. 2718ab9f29692e0ef04da7d278b25e727f04ed71 Add rpm-sort utility for sorting RPM versions b2e6455060f8d4566eed5188e26f4d58c8183427 Revert "Add a blurb to hello.spec cautioning against its use" -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2249/files/2c21974e87d35c9290ad683f8aa5502f59d27cc5..b2e6455060f8d4566eed5188e26f4d58c8183427 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint