Skip to content

Commit

Permalink
Fix endless loop
Browse files Browse the repository at this point in the history
Fix possible endless loop when parsing

- build_requires
- requires
- conflicts
- obsoletes
- provides

tags that contain macros.

Fixes #66.
  • Loading branch information
bkircher committed Feb 18, 2024
1 parent a2e3c91 commit 3ec2a13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 0 additions & 2 deletions pyrpm/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ def update_impl(self, spec_obj: "Spec", context: Dict[str, Any], match_obj: re.M
]:
# Remove comments on same line
value = value.split("#", 2)[0].rstrip()
# Macros are valid in requirements
value = replace_macros(value, spec=spec_obj)

# It's also legal to do:
# Requires: a b c
Expand Down
11 changes: 2 additions & 9 deletions scripts/fedora_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,8 @@
from pyrpm.spec import Spec


# Spec files to skip because of known issues. All of the following end up in an
# endless loop
skipfiles = (
"cairo-dock.spec",
"ghc",
"libreoffice.spec",
"python-pyghmi.spec",
"xscreensaver.spec",
)
# Spec files to skip because of known issues.
skipfiles = ()


def skip(filename: str) -> bool:
Expand Down

0 comments on commit 3ec2a13

Please sign in to comment.