Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Do-what-I-mean semantics for macros in spec comments (#158)

2017-02-20 Thread Vít Ondruch
> There's a certain difference between build-time scriptlets and install-time 
> scriptlets, please try to be specific which ones you're talking about.

Not sure what you mean? Is that because you can choose interpreter of the 
install time scripts while you can't do it for build time scripts?

Either way, I don't see this relevant for the first approximation, e.g. first 
case to solve is expansion of the macros outside of scriptlets ... and 
changelog actually, since there should not be expansion at all IMO.

-- 
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/158#issuecomment-281021477___
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: Do-what-I-mean semantics for macros in spec comments (#158)

2017-02-17 Thread Panu Matilainen
Of course, @ffesti is right - the *actual* problem is that there's no way to 
copmletely discard lines. What we need, instead of complex heuristics and 
different modes and all, is the equivalent of M4 "dnl".
Quoting from 
https://www.gnu.org/savannah-checkouts/gnu/m4/manual/m4-1.4.18/html_node/Dnl.html,
 this fits the bill just about perfectly:

> All characters, up to and including the next newline, are discarded without 
> performing any macro expansion. 
> The expansion of dnl is void. 

I was about to suggest %rem for this but perhaps %dnl, with intentional 
association with M4, would be a better choice because it's semantics are 
exactly what is called for here.

-- 
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/158#issuecomment-280697695___
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: Do-what-I-mean semantics for macros in spec comments (#158)

2017-02-17 Thread Panu Matilainen
There's a certain difference between build-time scriptlets and install-time 
scriptlets, please try to be specific which ones you're talking about. The pain 
points are the same in scriptlets too though:
- if you comment out %configure you'd expect it not to be executed
- people often place %define's and the like into scriptlets (perhaps thinking 
it'll only be executed when the scriptlet executes) and are just as baffled 
when the commented out thing did something



-- 
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/158#issuecomment-280672027___
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: Do-what-I-mean semantics for macros in spec comments (#158)

2017-02-17 Thread Vít Ondruch
I agree with @ffesti, i.e. I'd keep expanding the macros in scripts as they are 
expanded now and wouldn't expand the rest of macros.

(OT: Actually it'd be nice if there is a way how to mark begin-end (especially 
end) of the script  )

-- 
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/158#issuecomment-280666342___
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: Do-what-I-mean semantics for macros in spec comments (#158)

2017-02-17 Thread Florian Festi
This raises the question if we want to have a way to comment out lines in 
scripts. Commented lines should not make it into the script but be discarded 
completely - without expanding macros and evaluating defines.

-- 
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/158#issuecomment-280656095___
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: Do-what-I-mean semantics for macros in spec comments (#158)

2017-02-17 Thread Florian Festi
In the spec file there are the scripts and other sections. Right now there is 
no way to comment things out in scriptlets *on an rpm level*. All you can do is 
including a comment into the scriptlet. The fact that comments look similar in 
the spec file language and bash is just coincidence. For other interpreters 
they could (and do) look very different.

May be we should not treat comments in scripts any different than all other 
content in that script.

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