[MacPorts] #67537: grass @8.2.1: SyntaxError: invalid syntax
MacPorts
noreply at macports.org
Thu Jun 1 07:37:03 UTC 2023
#67537: grass @8.2.1: SyntaxError: invalid syntax
-------------------------+--------------------
Reporter: ryandesign | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: grass |
-------------------------+--------------------
Comment (by nilason):
Replying to [comment:4 ryandesign]:
> We typically don't do these kinds of complex replacements with
`reinplace` because something as simple as a version update can cause them
to no longer work due to minor changes in upstream code, and because
[ticket:60844 MacPorts only warns and does not error] when this happens.
MacPorts developers often ignore these warnings (or perhaps do not see
them because they are buried in a flood other output in debug or verbose
modes) with the consequence that changes that a Portfile was intending to
make are no longer being made. This might lead to wrong behavior of the
port, which users would then discover and hopefully report, but probably
not before being annoyed that they had to take time out of their day to do
that.
>
> Instead, for anything more complex than replacing one value with
another, we write a patchfile. The patchfile contains a placeholder, such
as `@PYBIN@` in this case. The Portfile applies the patch and then
afterward uses `reinplace` to replace the `@PYBIN@` placeholder with the
correct Portfile variable. If the patchfile ever fails to apply in some
future version of the software, MacPorts will error, forcing the MacPorts
developer to analyze why and either update the patchfile or remove it and
the `reinplace`. The context provided by the patchfile can assist the
developer in determining what the code looked like before and figuring out
whether similar code that still needs patching exists in the file now.
Again, thanks for the explanation! You convinced me to use patch files
also in these cases, updated the PR accordingly.
(Note to self: I'd better address this upstreams though).
--
Ticket URL: <https://trac.macports.org/ticket/67537#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list