Re: [Rpm-maint] [rpm-software-management/rpm] RFE: please add a way to get the unexpanded content of a rpm variable (#582)

2020-02-19 Thread Florian Festi
Closed #582 via #1064.

-- 
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/582#event-3051477166___
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: please add a way to get the unexpanded content of a rpm variable (#582)

2020-02-11 Thread Panu Matilainen
...and perhaps there should be that primitive to entirely suppress macro 
expansion (as per the %{literal:...} suggestion in #1049, which simply expands 
to its literal, unexpanded argument. But as literal is a macro type now, maybe 
that should be called %{verbatim:...} instead. Dunno.

-- 
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/582#issuecomment-584596785___
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: please add a way to get the unexpanded content of a rpm variable (#582)

2020-02-11 Thread Panu Matilainen
Good question, which I think settles the name as well: the argument is a macro 
name, so it's not the opposite of %{expand:...} at all but a specific thing 
that in rpm terminology is known as the macro body, so why make this any more 
complicated... lets just call it %{body:...} and be done with it.

-- 
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/582#issuecomment-584568890___
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: please add a way to get the unexpanded content of a rpm variable (#582)

2020-02-11 Thread Michael Schroeder
Is the argument a macro name or some generic string? I.e. is it 
`%{body:_builddir}` which should then return ` %{_topdir}/BUILD`? Or is it 
`%{noexpand:%_builddir}` which then should only do one level of expansion? I 
find the latter a bit weird.

-- 
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/582#issuecomment-584551949___
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: please add a way to get the unexpanded content of a rpm variable (#582)

2020-02-10 Thread Panu Matilainen
One fairly obvious choice here would be %{noexpand:...} as the direct opposite 
of %{expand:...}.

-- 
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/582#issuecomment-584152668___
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: please add a way to get the unexpanded content of a rpm variable (#582)

2019-04-17 Thread Panu Matilainen
Quote/quoting is something entirely different (we already have %{quote:...} btw)

Still thinking %{body:..} is the least worst so far.

-- 
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/582#issuecomment-484041299___
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: please add a way to get the unexpanded content of a rpm variable (#582)

2019-04-17 Thread Florian Festi
What about "literal", "quote" or "quoted"?

-- 
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/582#issuecomment-484037803___
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: please add a way to get the unexpanded content of a rpm variable (#582)

2019-04-17 Thread Panu Matilainen
%{unexpand:…} is not terrible, but it makes me think of unexpanding that has 
already been expanded, which is not what it's about. %{body:...} has the 
benefit that it's the same exact term we use in documentation, so people know 
exactly what it is.

-- 
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/582#issuecomment-483981053___
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: please add a way to get the unexpanded content of a rpm variable (#582)

2019-04-17 Thread Igor Gnatenko
@pmatilai `%{unexpand:…}`?

-- 
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/582#issuecomment-483977641___
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: please add a way to get the unexpanded content of a rpm variable (#582)

2019-04-17 Thread Panu Matilainen
Actually I think this is a perfectly legit request, it's not something you can 
currently do regardless of how many %-escapes you add and not invasive at all. 
Something along the lines of:
```
 %{body:} 
```
...but I'm not particularly happy about the name "body" so other suggestions 
welcome.

-- 
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/582#issuecomment-483974645___
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: please add a way to get the unexpanded content of a rpm variable (#582)

2019-04-17 Thread Igor Gnatenko
Just put enough `%%` in there. It seems quite invasive change without much 
benefit.

-- 
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/582#issuecomment-483969665___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] RFE: please add a way to get the unexpanded content of a rpm variable (#582)

2018-10-28 Thread nim-nim
As seen in
https://github.com/rpm-software-management/rpm/issues/581

when you want to write some variable definition to a macro file, it gets 
expanded by rpm. That usually does not matter but unfortunately, in some cases, 
you really really want the expansion to occur when the file definition is 
evaluated later, and not at the time you write this file (for example, in 
fedora-release, you don’t want the `%{?distprefix}` in `%{dist}` to be 
evaluated by the fedora-release spec, but by the other specs that read it).

You can more or less workaround this by peppering your macro definitions with 
`%`s before writing to the file but:

* the syntax is awkward, tricky to write and maintain
* that makes the result unusable in the spec that writes the macro file, so you 
you end up writing the same definition twice, once with added `%`s for the 
macro file and once without them for the spec itself. And as a result you 
introduce potential bug if someone forgets to update both definitions at the 
same time

Please add a syntax construct (and its lua equivalent like rpm.expand) to 
access first-level, unexpanded rpm variable contents.

-- 
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/582___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint