Skip to content

Commit

Permalink
Accommodate increased robustness in RPM 4.20
Browse files Browse the repository at this point in the history
RPM prior to version 4.20 failed to parse some abridged spec files.
Newer versions are more robust, so the fall back path won’t be used.

Signed-off-by: Nils Philippsen <[email protected]>
  • Loading branch information
nphilipp committed Sep 24, 2024
1 parent 0270dda commit a5a2653
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions rpmautospec/pkg_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,7 @@ def _get_rpmverflags(
else:
error = False
rpmerr_out = None
# Parsing this candidate spec file succeeded. In the case of the
# abridged spec file, we can skip parsing the full spec file.
if spec_candidate == abridged.name:
break
break
finally:
rpm.setLogFile(sys.stderr)
rpm.reloadConfig()
Expand Down
2 changes: 1 addition & 1 deletion tests/rpmautospec/test_pkg_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def test__get_rpm_packager(self, with_exception, processor):
ids=("with-prep", "without-prep", "with-prep-inadequate"),
indirect=True,
)
def test__get_rpm_verflags(self, testcase, release, prep, specfile, processor, caplog):
def test__get_rpmverflags(self, testcase, release, prep, specfile, processor, caplog):
with_name = "with-name" in testcase
specfile_missing = "specfile-missing" in testcase
specfile_broken = "specfile-broken" in testcase
Expand Down

0 comments on commit a5a2653

Please sign in to comment.