Port mechanism explanation needed
陈国凯
chenguokai17 at mails.ucas.ac.cn
Wed Mar 25 02:20:23 UTC 2020
On 25/03/2020, at 3:56 AM, "Rainer Müller" <raimue at macports.org> wrote:
>On 24/03/2020 17.33, 陈国凯 wrote:
>> I found no maintainers for port stlink and I wanted to take it if possible.
>> However, I am quite confused with the portfile mechanism of this port.
>>
>> After reading the wiki, I know that this portfile specifies a Github Repo from which the port system obtains source code. While there are two problems left for me.
>>
>> 1. I tried editing portfile locally, changing the version number but port would only try fetching the source code from mirrors of MacPorts, rather than fetching directly from Github upstream. Is there a way for me to test my modifications locally? And how does the mirroring mechanism work? If one changed the portfile configuration and merged changes into port tree, would the mirrors be synced automatically?
>
>You can skip the MacPorts mirrors with this flag, which is especially useful for
>development as at that stage distfiles will never be available on any of our
>mirrors yet:
> $ sudo port fetch --no-mirrors stlink
>
>Any push to master triggers a build for binary packages of changed Portfiles,
>which will also download all referenced distfiles. These will afterwards be
>fetched by other mirrors from the master mirror.
>
>> 2. I cannot figure out to whom the checksums belongs. I downloaded all 1.6.0 source code from Github release page while none of them matches the checksum specified in the portfile. How can I obtain the file with the expected checksum from Github (not from mirrors because I intend to make an upgrade afterwhile so that I should find a way to configure checksum)
>
>In general, to get a better understanding, what is happening, run the command in
>verbose (port -v) or even debug (port -d) mode.
>
>You can also get a list of all files and their mirror URLs with the port action
>'port distfiles'.
>
>HTH,
>Rainer
Thanks for your kind reply:)
I will give it a try.
Regards,
Xim
More information about the macports-dev
mailing list