Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Convenient %version without tilde macro (#1219)
OK, "fixed" might be an overstatement, given that the original request was more about the ability to extract the plain version from a string containing a tilde (AIUI) than about adding primitives to be able to do that (which #2181 does). In any case, something similar is being discussed here: https://github.com/rpm-software-management/rpm/discussions/2715. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1219#issuecomment-1801482308 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] RFE: Convenient %version without tilde macro (#1219)
I believe this is now fixed with #2181, closing. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1219#issuecomment-1798271272 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] RFE: Convenient %version without tilde macro (#1219)
Closed #1219 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/1219#event-10885140277 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] RFE: Convenient %version without tilde macro (#1219)
See also https://github.com/rpm-software-management/rpm/pull/1764 -- 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/issues/1219#issuecomment-906332380___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Convenient %version without tilde macro (#1219)
What about this: ``` %{strip %{version} ~^} ``` Would that fly? Or should I include it in python-srpm-macros instead? -- 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/issues/1219#issuecomment-775212046___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Convenient %version without tilde macro (#1219)
technically, since we are at RPM level, I wouldn't mind having this syntax: %{version//~} To remove whatever symbols I like. -- 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/issues/1219#issuecomment-628496489___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Convenient %version without tilde macro (#1219)
As I noted above, the problem with "upstream version" is that the pre/post suffixes *are* upstream. So upstream version and the bare version are two different things. -- 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/issues/1219#issuecomment-628482024___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Convenient %version without tilde macro (#1219)
I think `%{upstream_version}` would be better. However, probably in this case, we should just define %{pypi_version}, %{semver_version} because those have different rules. -- 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/issues/1219#issuecomment-628480076___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Convenient %version without tilde macro (#1219)
> As for passing passing empty strings (or strings with spaces etc) as a macro > argument, use %{quote:} Thanks. Ugly, but works. -- 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/issues/1219#issuecomment-628475121___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Convenient %version without tilde macro (#1219)
I get your point. But before we come ou with a concept of native "pre/post tag", I think we should have a way to address this in a common way. I like `%{bare_version}` (not "ursine" please). -- 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/issues/1219#issuecomment-628475009___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Convenient %version without tilde macro (#1219)
This was actually suggested here first (see #722) and rejected in this form with the notion that there might be something there however. So of the problem is figuring what that "something like" is. Singling out tilde seems odd. I could imagine there being cases where you want these "rpm embellishments" stripped out, but that should then also cover caret (and any other such thing that might get added in the future), which calls for a more generic name. "Upstream version" was mentioned in the PR, but that doesn't sound right either because the tilde/caret parts typically *are* from upstream. Something like "bare version" (any phonetic resemblance to large four feet mammals is purely coincidental), *but* this makes me think we're going backwards here, and that we should start by disassembling Version to its components at the "source" already. There's this "main" or "bare" version which is typically something like [major[.minor[.micro[.nano and these can have pre- and post-modifiers that affect the sorting. Should spec have separate tags to declare these as individual components that rpm arranges into a Version as we know it? Or something... As for passing passing empty strings (or strings with spaces etc) as a macro argument, use %{quote:} -- 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/issues/1219#issuecomment-628431525___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] RFE: Convenient %version without tilde macro (#1219)
@ignatenkobrain has has created this in Fedora's rust-srpm-macros: ```lua %version_no_tilde() %{lua: local sep = rpm.expand('%1') local ver = rpm.expand('%2') \ if sep == '%1' then sep = '-' end \ if ver == '%2' then ver = rpm.expand('%version') end ver = ver:gsub('~', sep) \ print(ver) } ``` I'd like to have something like this part of the standard issued macros. **However**, I think the default should be empty separator for 2 reasons: - the name of this macro suggests there is no tilde, not that the tilde is replaced with anything - it seem incredibly hard to pass an empty string as a macro argument (I haven't figured out how to do that yet) WDYT? -- 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/issues/1219___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint