Portupgrade
m |
|||
Line 47: | Line 47: | ||
That's it. You'll have to repeat these steps (portversion, then portupgrade on one of the results) a few times to complete update your software, but all in all it's fairly simple and straightforward. | That's it. You'll have to repeat these steps (portversion, then portupgrade on one of the results) a few times to complete update your software, but all in all it's fairly simple and straightforward. | ||
− | Note - you may sometimes be prompted to run '''pkgdb -F''' to fix inconsistencies with listed dependencies within programs when you issue portversion commands, after upgrading ports. Just do it ('' | + | Note - you may sometimes be prompted to run '''pkgdb -F''' to fix inconsistencies with listed dependencies within programs when you issue portversion commands, after upgrading ports. Just do it ('''pkgdb -F''', that is) and it will take care of the problem, allowing you to issue the portversion command. |
Revision as of 01:10, 25 August 2004
portupgrade and you
portupgrade is a small collection of tools that goes hand in hand with cvsup. Portupgrade does what it says - upgrades your ports - but it actually means your installed ports, even packages that were installed as part of the base system. Portupgrade includes two important programs - portupgrade, and portversion. Between them and cvsup, you'll have the ability to keep all installed software on your system up to date, so long as it exists in the ports tree.
See also - cvsup - Update_the_ports_tree - portversion
Installing the Portupgrade suite
Installation is very simple:
> su Enter password: oyabun# cd /usr/ports/sysutils/portupgrade oyabun# make install clean
Once it's done, you'll have to exit and re-enter your session as root to use it without typing full pathnames. This assumes you used su to become root from a different account. If you logged in from the physical console as root, you can exit and re-login, or you can simply su to a new shell. (Lazy!)
Using portupgrade and portversion
Now that that's done, you need to update your ports database.
oyabun# portsdb -Uu
This will likely take a while.
Now you can use portversion to see a list of installed programs that are out of date like so:
oyabun# portversion | grep '<' expat < ezm3 < fontconfig < freetype2 < imake < libnet-devel < libtool < oyabun#
This is a possible example of the output you'd recieve from portversion. Issuing a portversion command without the | grep '<' would produce a list of ALL installed packages on your machine, with < for "out of date", = for "current", and > for "newer". How can you get "newer" than what's in the ports tree? I don't know exactly, but it will happen to you, and someone who reads this needs to explain it.
Now, to upgrade one of these packages, do this:
oyabun# portupgrade imake
Portupgrade will upgrade the port with the newer version available in the ports tree, and also take care of any dependencies the new version may have - if it needed ANOTHER installed port upgraded to a newer version, for example.
That's it. You'll have to repeat these steps (portversion, then portupgrade on one of the results) a few times to complete update your software, but all in all it's fairly simple and straightforward.
Note - you may sometimes be prompted to run pkgdb -F to fix inconsistencies with listed dependencies within programs when you issue portversion commands, after upgrading ports. Just do it (pkgdb -F, that is) and it will take care of the problem, allowing you to issue the portversion command.