Manually stepping through port phases

Scott Webster sewebster at gmail.com
Mon Jun 14 22:38:17 PDT 2010


On Mon, Jun 14, 2010 at 9:37 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> 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.
>

Yeah, I guess it makes some sense that all of the phases will include
necessary predecessor stages, but it is a bit weird for install to
then include the NEXT phase for you.  However, I suppose if you know
this it makes little difference and it would be odd for users to have
to type "port activate someport" in order to install things from
scratch.

>
>> 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.")?
>>

I now realize that my problem is that "port install" won't copy the
files from $destroot to $prefix/var/macports/software if the port is
already installed.  So I guess if I want to do this then I have to
uninstall first.

However since then I've added a local repository to my sources.conf
and just copied the gimp2 portfile over there, renaming the port
"mygimp".  This seems to work fine, but of course all of the installed
files have the same names as the gimp2 port so I can only have one of
them active at once.


>> "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.
>

Oops, how embarrassing!

Thanks for the help.

Scott


More information about the macports-users mailing list