Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A bash script to automate DarwinPorts upgrades' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A bash script to automate DarwinPorts upgrades
Authored by: jsumners on Oct 28, '05 07:29:53AM

`man port`

"-u uninstall non-active ports when upgrading and uninstalling"

Seems to me, the easiest solution is to not use the -u parameter.



[ Reply to This | # ]
A bash script to automate DarwinPorts upgrades
Authored by: dluke on Oct 28, '05 07:33:03AM

Why not just add '-f'?

That will force it to uninstall the to-be-upgraded port even if other ports depend on it (yeah, it might break something, but so could the above script).



[ Reply to This | # ]
A bash script to automate DarwinPorts upgrades
Authored by: BjarneDM on Oct 28, '05 04:11:30PM
-u doesn't force an un-install when dependencies are present. If a port is dependent upon the old version you'll get an error-message that port was unable to un-install the old version along with a list of the ports that are dependent upon the old version and a suggestion to un-install these.

The only way I'm at present aware that my script can mess up is if a dependency isn't found, but that won't break your DarwonPort installation - you'll just have to do some manual work to fix the situation.

[ Reply to This | # ]
A bash script to automate DarwinPorts upgrades
Authored by: BjarneDM on Oct 28, '05 04:01:54PM
If you don't use the -u option the old versions will be kept and used by the ports that are dependent upon them. Thus, if you want all of the ports to use the newest version of a port you'll have to use -u and un-install.

You could try to use the -f option, but that's fraught with danger and not at all recommended by the DarwinPorts team. I've had to re-install my whole DarwinPorts structure because of excessive use of -f.

For instance, if you are linking to the MySQL libraries, these change names between versions, so if you have compiled support for MySQL into eg PHP and Postfix, you'll have to recompile these from scratch in order to get the new libraries installed. Otherwise, the programs simply cease to function.

[ Reply to This | # ]
A bash script to automate DarwinPorts upgrades
Authored by: 10drill on Oct 28, '05 09:05:55PM

I've been upgrading ports with "sudo port -vuf upgrade portname" for months now with no problem. So far no big dependency issues either...



[ Reply to This | # ]