-
Couldn't load subscription status.
- Fork 20
Open
Labels
area/fedoraRelated to Fedora ecosystemRelated to Fedora ecosystemcomplexity/single-taskRegular task; should be done within daysRegular task; should be done within daysgain/lowDoesn't bring much value to usersDoesn't bring much value to usersimpact/lowAffects only few of the usersAffects only few of the userskind/bugAn unexpected problem or behaviorAn unexpected problem or behavior
Description
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
FalseI 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)
Steps to reproduce
See aboveWorkaround
- There is an existing workaround that can be used until this issue is fixed.
Participation
- I am willing to submit a pull request for this issue. (Packit team is happy to help!)
Metadata
Metadata
Assignees
Labels
area/fedoraRelated to Fedora ecosystemRelated to Fedora ecosystemcomplexity/single-taskRegular task; should be done within daysRegular task; should be done within daysgain/lowDoesn't bring much value to usersDoesn't bring much value to usersimpact/lowAffects only few of the usersAffects only few of the userskind/bugAn unexpected problem or behaviorAn unexpected problem or behavior
Type
Projects
Status
backlog