[Rpm-maint] [rpm-software-management/rpm] macros: Add %version_notilde (#722)

Panu Matilainen notifications at github.com
Mon Jun 3 12:13:01 UTC 2019


pmatilai commented on this pull request.



>  %autosetup(a:b:cDn:TvNS:p:)\
 %setup %{-a} %{-b} %{-c} %{-D} %{-n} %{-T} %{!-v:-q}\
 %{-S:%global __scm %{-S*}}\
 %{expand:%__scm_setup_%{__scm} %{!-v:-q}}\
 %{!-N:%autopatch %{-v} %{-p:-p%{-p*}}}
 
+# Macro to remove or replace tilde from version.
+# -v<version> Sets the version to be used for replacement. Default is %version.
+%version_notilde(v:) %{lua:
+    local sep = rpm.expand('%1')
+    local ver = rpm.expand('%{!-v:%{version}}%{-v:%{-v*}}')

Erm, never mind. This is Lua, and rpm.expand() is needed to get at the arguments in the first place.

-- 
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/722#discussion_r289813642
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190603/cd986bac/attachment.html>


More information about the Rpm-maint mailing list