Skip to content

Commit

Permalink
Merge pull request #254 from OscarL/commented_out_patches
Browse files Browse the repository at this point in the history
Support commented out lines in the PATCHES section.
  • Loading branch information
Begasus authored Jun 15, 2024
2 parents 36f9a13 + ee67ce2 commit 49f29cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion HaikuPorter/Port.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@ def validateRecipeFile(self, showWarnings=False):
# collect all referenced patches into a single list
if key in entries and entries[key]:
for index in entries[key].keys():
allPatches += entries[key][index]
allPatches += [
e for e in entries[key][index] if not e.strip(' \t').startswith('#')
]

# store extension-specific value under base key
recipeKeys[baseKey] = entries[key]
Expand Down
3 changes: 2 additions & 1 deletion HaikuPorter/Source.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def __init__(self, port, index, uris, fetchTargetName, checksum,
# make those absolute paths.
if self.patches and port.patchesDir:
self.patches = [
port.patchesDir + '/' + patch for patch in self.patches
port.patchesDir + '/'
+ patch for patch in self.patches if not patch.strip(' \t').startswith('#')
]

# ADDITIONAL_FILES refers to the files relative to the additional-files
Expand Down

0 comments on commit 49f29cb

Please sign in to comment.