port -u upgrade outdated

Thomas De Contes d.l.tDeContes at free.fr
Thu Oct 4 19:57:01 PDT 2007


Le 5 oct. 07 à 00:22, Ryan Schmidt a écrit :

> On Oct 4, 2007, at 15:44, Emmanuel Hainry wrote:
>
>> Citando Thomas De Contes :
>>
>>> port -u uninstall
>>> is equvalent to
>>> port uninstall inactive
>>> ?
>
> I had never used "port -u uninstall" before,

it was in "man port"

> but yes, those appear to be equivalent.

ok :-)

>
>>> port -u upgrade anything
>>> is equvalent to
>>> port upgrade anything
>>> port uninstall inactive
>>> am I right ?
>
> No,

ah, well,
port -u uninstall anything
is equvalent to
port uninstall anything
?
if not, what is different ?


> "port -u upgrade foo" uninstalls inactive versions of foo before  
> activating the new version of foo. It does not affect ports other  
> than foo. "port uninstall inactive" uninstalls all inactive ports  
> (whether those ports are foo or bar or baz or whatever).

ok, so if i find how to do
port -u upgrade outdated
i don't need to activate all first :-)

well, if i don't forget anything,
what i need is to tell "port" that i want to force the "uninstall",  
but not to force the rebuild of all dependencies
but -f forces both


>
>
>>> so,
>>>
>>> port -u upgrade outdated
>>> doesn't works because it needs -f to uninstall
>
> Right, if ports depend on the ports being upgraded, then -f is  
> needed so MacPorts won't complain.
>
>>> port -fu upgrade outdated
>>> is not fine, because with upgrade it rebuilds all dependencies,  
>>> so it needs
>>> -n to build only outdated
>
> Right.
>
>>> port -nfu upgrade outdated
>>> doesn't works because the upgrade is not done in the right  
>>> order ... :-( !
>
> I believe that's right. I'm not sure what order the upgrades are  
> done in, but I'm not convinced it's the right order.

as i said, when i tried that i got an error ... so there is sth wrong


> Consider that apache2 depends on apr and apr-util, and that apr- 
> util also depends on apr. "port outdated" would print these in the  
> following order: apache2, apr, apr-util. So if you upgrade these in  
> alphabetical order, apache2 will be upgraded first, and it will  
> build against your old version of apr and apr-util. Then apr will  
> be upgrated, and then apr-util will be upgrated and will link  
> against the new version of apr. If the changes in apr and apr-util  
> are minor (binary compatible with the previous release), this won't  
> be a problem, but if the ABI changed, then apache2 will be broken  
> after apr and apr-util are upgraded. Also, it may be a problem that  
> apache2 uses apr-util but apache2 and apr-util have been built  
> against different versions of apr.

well, if apr and apr-util are outdated, but not apache2, we need to  
rebuild apache2 because it depends on ports which are upgrated, is it  
right ?
does "port upgrade outdated" do it ??
if yes and no, "port -u upgrade outdated" is right to do not  
uninstall by default, since it may cause stuff to stop working

so, it would be good to make an option to port which allow us to  
force to rebuid *dependents* of ports which are upgrated, but not  
*dependencies* of them
so that, "port -u upgrade outdated" should be able to uninstall  
without -f , is it right ? :-)


ps :
"man port" says "outdated: *installed* ports that are out of date ..."
but it seems that it is *active* ports, not installed ones


-- 
j'agis contre l'assistanat, je travaille dans une SCOP !





More information about the macports-users mailing list