[Rpm-maint] [rpm-software-management/rpm] Indentation support for tags (Issue #2927)
Root-Core
notifications at github.com
Thu Feb 22 19:06:29 UTC 2024
**Describe the bug**
I try to implement a cross distribution spec file and the dependency names differ.
So I added an if and it works fine, until I indent the line in the if.
**To Reproduce**
1. Store the spec file in `/tmp/test.spec`
2. run `rpm --specfile /tmp/test.spec`
```
Name: demo
Version: 1.0.0
Release: 0
Summary: RPM package
License: GPL
BuildArch: noarch
%if 0%{?suse_version}
Requires: xdotool
%else
Requires: libxdo
%endif
%description
This is a test.
%install
%__install -m 755 mybinary -Dt %{buildroot}%{_bindir}/
%files
%{_bindir}/mybinary
```
**Expected behavior**
It should be fine and output `demo-1.0.0-0.noarch`.
**Output**
```
error: line 11: Unknown tag: Requires: libxdo
error: query of specfile /tmp/test.spec failed, can't parse
```
**Environment**
- OS / Distribution: tested on Alma and openSUSE
- Version 4.16.1.3 / 4.14.3
**Additional context**
I am a total rpm newbie and this might be the desired behavior.
I know that the spec file "expands" / is evaluated to something with an randomly indented line, but it looks way better in the spec file.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2927
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/2927 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240222/c73f7113/attachment.html>
More information about the Rpm-maint
mailing list