Opened 7 years ago
Last modified 7 years ago
#54605 new defect
Update guide to tell user where to get "original" Portfile for patching
Reported by: | jfcaron3 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | guide | Version: | |
Keywords: | Cc: | ||
Port: |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
If you read: https://guide.macports.org/#development.patches.portfile
It tells you how to make a copy and generate patch for a Portfile, but it does not tell you where to find the original Portfile. Looking on my system with find /opt/local grep|portname|grep Portfile, I find two candidates, one somewhere in /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports and another somewhere in /opt/local/var/macports/registry/portfiles/ and they appear slightly different.
Even if this is an idiosyncrasy in my system, the guide section should include the default location of the Portfile to be used to generate patches.
Change History (3)
comment:1 Changed 7 years ago by kencu (Ken)
comment:2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
The command port file foo
will tell you where the Portfile for port foo is located.
The registry contains a copy of the Portfile as it appeared when you installed the port. This may not be the current version of the Portfile, and if you're going to submit a patch, it should be based on the current version, which is in the sources directory, or, as Ken said, in our GitHub repository.
comment:3 Changed 7 years ago by jfcaron3
Those are both good suggestions. One or both methods should be mentioned in the Portfile patches section of the Guide.
I find your best bet is to sudo copy the original Portfile in it's original location to
Portfile.orig
, make your edits toPortfile
, and then diff them withdiff -u Portfile.orig Portfile > ~/Desktop/somename.diff
Or go the github way instead, if you're going to do this at all frequently.