RPM

Comment 3 for bug 1209142

Revision history for this message
Jeff Johnson (n3npq) wrote :

Attached patch "fixes" both issues.

(aside)
There are other issues here, starting with what behavior one
"expects" from an interpreter.

For starters, there is no attempt to pass arguments to the embedded
lua interpreter for hysterical reasons. The "fix" would be to use
parseEmbedded() for lua as well as all the other embeddings.

The empty-body-in-embedded-interpreter analogue on the CLI is equivalent
to defining what one expects from, say,
        $ lua < /dev/null
One clearly expects an exit code from command execution, and on some
operating systems like *BSD, one sometimes expects a usage message. There
is also the EOF condition from feeding /dev/null (or "") to an interpreter

The problems with the analogy are:

1) Each interpreter can/will have different implementation defined behavior,
for /dev/null parsing preventing a common/simple rule for all RPM embedded interpreters.

2) The analogue of stdout that redirects output from embedded interpreters
into a macro expansion buffer isn't a general/complete as what is on the command line.

3) There is no analogue of a CLI command "exit code" available for a macro expansion