Index: chapter.sgml =================================================================== RCS file: /home/dcvs/doc/en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml,v retrieving revision 1.233 diff -u -r1.233 chapter.sgml --- chapter.sgml 24 Dec 2008 21:47:59 -0000 1.233 +++ chapter.sgml 26 Dec 2008 03:28:05 -0000 @@ -307,23 +307,6 @@ Major and Minor Upgrades - This process will remove old object files and - libraries which will break most third party applications. - It is recommended that all installed ports either be removed - and re-installed or upgraded later using the - ports-mgmt/portupgrade - utility. Most users will want to run a test build using - the following command: - - &prompt.root; portupgrade -af - - This will ensure everything will be re-installed - correctly. Note that setting the - BATCH environment variable to - yes will answer yes to - any prompts during this process, removing the need for - manual intervention during the build process. - Major and minor version updates may be performed by providing freebsd-update with a release version target, for example, the following command will @@ -410,19 +393,77 @@ three. - All third party software will now need to be rebuilt and - re-installed. This is required as installed software may - depend on libraries which have been removed during the upgrade - process. The - ports-mgmt/portupgrade - command may be used to automate this process. The following - commands may be used to begin this process: - - &prompt.root; portupgrade -f ruby -&prompt.root; rm /var/db/pkg/pkgdb.db -&prompt.root; portupgrade -f ruby18-bdb -&prompt.root; rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db -&prompt.root; portupgrade -af + This process will remove old object files and + libraries which will break most third party applications. + Hence it is essential that all installed ports either be removed + and re-installed or upgraded by using a tool for managing + ports, see . + + A procedure for accomplishing this task with + Portmaster (see ) is as follows. Note that it is assumed + that ports are installed to /usr/local; adjust as + needed. + + + + Make a list of all installed ports: + + &prompt.root; portmaster -l > installed-port-list + + + + Update the Ports Collection. + + + + Ask Portmaster to recurse + through the installed ports to get a list of + distinfo files, then recurse through + all files in /usr/ports/distfiles to make + sure that they are still associated with an installed port. + If not, delete the stale file: + + &prompt.root; portmaster --clean-distfiles-all + + + + Fetch required distfiles to prepare to rebuild all + upgraded ports: + + &prompt.root; portmaster -Faf + + + + Delete all installed packages: + + &prompt.root; pkg_delete -a + + + + Remove all shared libraries stored for backward + compatibility, since they are not needed anymore: + + &prompt.root; rm -rf /usr/local/lib/compat/pkg + + Do not forget to manually check through /usr/local to make sure it is + really empty. + + + + Look at the list generated in the first step and install + all the root and leaf ports that still needed. The trunk + and branch ports are dependencies, and will automatically be + installed as needed. + + One may want to use the option for + the installations and then run + again. + + Once this has completed, finish the upgrade process with a final call to freebsd-update. Issue the