Manually stepping through port phases
Ryan Schmidt
ryandesign at macports.org
Mon Jun 14 21:37:41 PDT 2010
On Jun 14, 2010, at 20:35, Scott Webster wrote:
> Looking for some pointers for sequentially stepping through the
> different port phases... The reason I want to do this is to test a
> change to a package (modify the source), so I figured I would do the
> following:
>
> port fetch gimp2
> port extract gimp2
> *make my changes*
You can just type "sudo port extract gimp2"; MacPorts knows it needs to do the fetch phase before that.
> port patch gimp2
> port configure gimp2
> port build gimp2
> port destroot gimp2
> port install gimp2
> port activate gimp2
Somewhat non-intuitively, perhaps, "install" includes "activate", which is why you weren't able to "activate" after having done "install" -- "activate" was already done for you.
You could also have omitted to manually do patch, configure, build, and destroot, and gone straight to install, since again MacPorts knows to do those phases for you.
> It looks like what happened is that everything was fine up until the
> "port install" command and it seems that then port decided I didn't
> need to install after all and wiped out the destroot through it's
> cleaning process. This is likely because I already have gimp2
> installed I guess... but is there a way to make "port install" only do
> the "install" phase (as defined in the macports guide as "Copy a
> port's destrooted files into ${prefix}/var/macports/software.")?
>
> "port activate" then failed with:
> [~@swmb]$ sudo port -v activate gimp2
> sudo: cannot get working directory
> shell-init: error retrieving current directory: getcwd: cannot access
> parent directories: No such file or directory
You're in a directory that no longer exists. (I'm guessing inside the port's work directory which got cleaned up when the install finished.) Get to a directory that does exist before issuing any more port commands.
More information about the macports-users
mailing list