understanding macports

Rainer Müller raimue at macports.org
Sun Mar 18 21:08:54 UTC 2018


On 2018-03-18 21:12, Abhishek Kashyap wrote:
> No,I think it should be implemented in port.tcl(macports-base) under
> function *procaction_selfupdate { action portlist opts }.*
> See there line no. 2758.

port/port.tcl is the port client that implements the command line
interface. All features should be available in the macports1.0 package
and expose an API that can be used from multiple user interfaces:
command line and GUI. I think the base hacking video linked earlier in
this thread explains it in detail.

In case of the news feature, that means that the parsing of the files,
the management which files have been read, etc. should all be handled
inside of macports1.0. The API exposed there can then be used by
port/port.tcl to query for unread news and to retrieve the news items in
order to present them the user. Therefore macports1.0 provides the data,
but the code to handle the command line interface and the formatting of
the output would be in port/port.tcl.

While designing API for macports1.0, always keep in mind that a
potential GUI client should also be able to use it, but would probably
present the results in a completely different way than the command line
client.

On 2018-03-18 21:22, Abhishek Kashyap wrote:
> I also have to add file to macports-ports
> <https://github.com/macports/macports-ports>/news/  but how does it
> implemented.

Once again I am not sure what your question is...?

The news items added to the macports-ports repository would be written
by other developers for announcements that affect multiple ports or
cannot be distributed with a Portfile.

Rainer


More information about the macports-dev mailing list