[Rpm-maint] [rpm-software-management/rpm] Macro %-x modifies original flag if argument follows without intervening space (Issue #2454)
Ralf Habacker
notifications at github.com
Fri Mar 24 13:38:30 UTC 2023
See the following example:
```
$rpm --version
RPM version 4.14.3
$ rpm --define '%foo(b:) %{-b}' --eval '%foo -b2'
-b 2
```
The macro adds a space between flag and argument, which may affect passing to applications as shown by the following example:
```
$ python3 -bb
Python 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
<CTRL-D>
```
Passing the option through a rpm macro returns:
```
$ rpm --define '%foo(b:) python3 %{-b}' --eval '%foo -bb`
python3 -b b
```
Running the generated command fails:
```
$`rpm --define '%foo(b:) python3 %{-b}' --eval '%foo -bb'`
python3: can't open file 'b': [Errno 2] No such file or directory
```
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2454
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/2454 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230324/515cc872/attachment.html>
More information about the Rpm-maint
mailing list