Fixing source-code bugs using MacPorts facilities.

Ken Cunningham ken.cunningham.webuse at gmail.com
Sun Jul 26 07:37:11 UTC 2020


On 2020-07-25, at 11:26 PM, Ryan Schmidt wrote:

> 
> 
> On Jul 26, 2020, at 01:15, Ian Wadham wrote:
> 
>> The above all worked very well, but only once… :-(
>> 
>> If I test the app I have installed and find there is still some problem, I need to edit the source and go back to the build step. But “build” just says "--->  Computing dependencies for kpat”  and exits, even if I use “sudo port -f build”. It does not see that the source has changed.
> 
> MacPorts keeps track of which phases have been completed. If you successfully build a port, for example, the build phase is marked completed and will not be attempted again until you clean and start over. 
> 
> To bypass that behavior, you can edit the state file (a file in the work directory whose name is .macports.${subport}.state) and remove lines from the end of it for completed phases that you want to retry.
> 


Indeed as Ryan said.

I wanted to let you see the basics, without overwhelming you.

Once you can do that, as Ryan points out, you can delete the destroot and/or build folders, edit  the state file, and have MacPorts redo the steps you want it to do.

You can also have macports just redo the destrooting without redoing the build, editing the portfile, and passing "-o" to have it leave the build alone -- I do this quite often for complex destrooting scenarios.

It is incredibly powerful, but it does miss one feature that I would really like -- to be able to do this using a stable git repo on my system as the source folder, rather than a transient one created for each build.

Ken




More information about the macports-users mailing list