What happened? What is the problem?
Hello, I was wondering why there isn't a build or install section found in flowblade.spec.
When I parse the spec, I get:
>>> from specfile import Specfile
>>> specfile = Specfile('flowblade.spec')
>>> with specfile.sections() as sections:
... for section in sections:
... print(section.name, section.options)
...
package
description
prep
generate_buildrequires
build
install
check
files -f flowblade-trunk/%{name}.lang
changelog
>>> with specfile.sections() as sections:
... print("build" in sections)
... print("install" in sections)
...
False
False
I examined the specfile, and I found it has:
%build[space here]
...
%install[spec here]
Indeed, sections.get("build ") works.
I did not expect this to obfuscate the result of "build" in sections or sections.build. This means the only reliable way to get the build section is to iterate all the sections and look at the name.
What did you expect to happen?
I expected the insignificant trailing whitespace to be ignored.
Example URL(s)
https://src.fedoraproject.org/rpms/flowblade/blob/50cab22e213a45b84a6f839057b436f6430e422f/f/flowblade.spec
Steps to reproduce
Workaround
Participation
What happened? What is the problem?
Hello, I was wondering why there isn't a build or install section found in flowblade.spec.
When I parse the spec, I get:
I examined the specfile, and I found it has:
Indeed,
sections.get("build ")works.I did not expect this to obfuscate the result of
"build" in sectionsorsections.build. This means the only reliable way to get the build section is to iterate all the sections and look at the name.What did you expect to happen?
I expected the insignificant trailing whitespace to be ignored.
Example URL(s)
https://src.fedoraproject.org/rpms/flowblade/blob/50cab22e213a45b84a6f839057b436f6430e422f/f/flowblade.spec
Steps to reproduce
Workaround
Participation