Skip to content

plist-sort: fix empty PLIST_SUB substitutions#2

Open
LaurentChardon wants to merge 1 commit into
ppekala:masterfrom
LaurentChardon:master
Open

plist-sort: fix empty PLIST_SUB substitutions#2
LaurentChardon wants to merge 1 commit into
ppekala:masterfrom
LaurentChardon:master

Conversation

@LaurentChardon
Copy link
Copy Markdown

Fix handling of empty PLIST_SUB variables.

Variables defined as empty were incorrectly collapsed from "%%VAR%%" to "VAR".

Fix handling of empty PLIST_SUB variables.

Variables defined as empty were incorrectly collapsed
from "%%VAR%%" to "VAR".
@ppekala
Copy link
Copy Markdown
Owner

ppekala commented Mar 11, 2026

Hello, thanks for submitting this PR.
Unfortunately it does not solve whole problem you are describing.
It works for one case:

%%VAR%%/some/file

but will fail for more complicated lines, like for example:

%%PORTDOCS%%%%VAR%%/some/file.

I would like to fix all cases in one go and need some time to debug further.
Can you provide some example ports that fail in your testing?

@LaurentChardon
Copy link
Copy Markdown
Author

LaurentChardon commented Mar 12, 2026

Hi, thanks for looking into my patch.
I have made this patch to fix the very common situation where a variable is either "" or "@comment ", to handle port OPTIONS. There are hundreds of ports in this situation (442 if my portgrep command works as intended). It's really the only case that this patch intended to fix. Because of the "@comment" keyword, this substitution has to be the first one in order to work.
The particular plist file that I was sorting is the one from emulators/mame.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants