how to start with macports ?

Emmanuel Hainry ehainry at free.fr
Sun Sep 16 10:09:33 PDT 2007


Citando Thomas De Contes :
>
> Le 13 sept. 07 à 02:06, Ryan Schmidt a écrit :
>
>>
>
>
> well, i try to make a script which can install or upgrade, without i have 
> to tell what to do
>
>
> now i have :
>
> port install subversion
> port install mpfr
> port install gtk2
> port -u upgrade outdated
>
> i though that in case of install, "port -u upgrade outdated" would do 
> nothing, and in case of upgrade, "port install ..." would do nothing,
> but it's not like that
>
>
> how can i make my script ?
>
> or is it possible to modify "port install ..." to make it either do 
> nothing, or upgrade properly ?
>

port consists in phases that are executed one after another. install
needs configure, build, destroot to have been done. And those do not
conflict with the fact a previous version of the port already exist.
Which means that when you do port install foo, what is done is done
(only the last (activate) phase was erroneous). deactivate and activate
are just some copying or moving of the built program.
>

If you want to upgrade a port, you can first deactivate it then install
it. The thing upgrade does better is that it remembers the variants you
had selected. If doing a "port installed foo" before deciding if you
need to upgrade or install foo is too much a burden, you can try
something like:

port deactivate foo ; port install foo

which will issue an error if foo was not installed and will then proceed
to install it, and just install a new version if it is already installed.

Emmanuel



More information about the macports-users mailing list