Friday, May 14, 2004

Forcing an update

The ports system can get quite confusing, and one of the tougher problems is getting something to update correctly. For instance, say you have v2.1 of something installed. But the latest is version 2.2 and you want to just skip to that version. But other ports depend on the 2.1, so you don't want to just pkg_deinstall (or you can't). The way to do it is to "force" the upgrade.



Most Unix commands have an option that says "I know better than you, so just let me do it already and stop complaining". For instance, the -f option for the rm command forces it to just work. A scary option, to be sure, but sometimes a necessary one.



The port utilities are no exception. Most of them have a -f option that just says "Do this and don't complain". pkg_delete has it, so it will delete the port even if there are other dependencies. And so does portupgrade. So the way to fix the above problem is:




$ portupgrade -o -f


This tells portupgrade to update with , and just do what I say, please. Read the voluminous man page here:




FreeBSD Hypertext Man Pages: portupgrade



No comments:

Post a Comment