Log in Page Discussion History Go to the site toolbox

Wdummy

From BluWiki

http://www.freesql.org/freesql/disclaimerLink title 4.5.4.2 Upgrading Ports using Portupgrade

The portupgrade utility is designed to easily upgrade installed ports. It is available from the ports-mgmt/portupgrade port. Install it like any other port, using the make install clean command:

  1. cd /usr/ports/ports-mgmt/portupgrade
  2. make install clean

Scan the list of installed ports with the pkgdb -F command and fix all the inconsistencies it reports. It is a good idea to do this regularly, before every upgrade.

When you run portupgrade -a, portupgrade will begin to upgrade all the outdated ports installed on your system. Use the -i flag if you want to be asked for confirmation of every individual upgrade.

  1. portupgrade -ai

If you want to upgrade only a certain application, not all available ports, use portupgrade pkgname. Include the -R flag if portupgrade should first upgrade all the ports required by the given application.

  1. portupgrade -R firefox

To use packages instead of ports for installation, provide -P flag. With this option portupgrade searches the local directories listed in PKG_PATH, or fetches packages from remote site if it is not found locally. If packages can not be found locally or fetched remotely, portupgrade will use ports. To avoid using ports, specify -PP.

  1. portupgrade -PP gnome2

To just fetch distfiles (or packages, if -P is specified) without building or installing anything, use -F. For further information see portupgrade(1).


4.5.4.4 Upgrading Ports using Portmaster

Portmaster is another utility for upgrading installed ports. Portmaster was designed make use of the tools found in the “base” system (it does not depend upon other ports) and uses the information in /var/db/pkg/ to determine which ports to upgrade. It is available from the ports-mgmt/portmaster port:

  1. cd /usr/ports/ports-mgmt/portmaster
  2. make install clean

Portmaster groups ports into four categories:

   *
     Root ports (no dependencies, not depended on)
   *
     Trunk ports (no dependencies, are depended on)
   *
     Branch ports (have dependencies, are depended on)
   *
     Leaf ports (have dependencies, not depended on)

You can list all the installed ports and search for updates using the -L option:

  1. portmaster -L

===>>> Root ports (No dependencies, not depended on) ===>>> ispell-3.2.06_18 ===>>> screen-4.0.3

       ===>>> New version available: screen-4.0.3_1

===>>> tcpflow-0.21_1 ===>>> 7 root ports ... ===>>> Branch ports (Have dependencies, are depended on) ===>>> apache-2.2.3

       ===>>> New version available: apache-2.2.8

... ===>>> Leaf ports (Have dependencies, not depended on) ===>>> automake-1.9.6_2 ===>>> bash-3.1.17

       ===>>> New version available: bash-3.2.33

... ===>>> 32 leaf ports

===>>> 137 total installed ports

       ===>>> 83 have new versions available

All the installed ports can be upgraded using this simple command:

  1. portmaster -a
   Note: By default, Portmaster will make a backup package before deleting the existing port. If the installation of the new version is successful, Portmaster will delete the backup. Using the -b will instruct Portmaster not to automatically delete the backup. Adding the -i option will start Portmaster in interactive mode, prompting you before upgrading each port.

If you encounter errors during the upgrade process, you can use the -f option to upgrade/rebuild all ports:

  1. portmaster -af

You can also use Portmaster to install new ports on the system, upgrading all dependencies before building and installing the new port:

  1. portmaster shells/bash

Please see portmaster(8) for more information.

Site Toolbox:

Personal tools
GNU Free Documentation License 1.2
This page was last modified on 7 May 2009, at 16:39.
Disclaimers - About BluWiki