Date: Fri, 6 Aug 2010 23:38:12 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r210979 - in user/dougb/portmaster: . files Message-ID: <201008062338.o76NcCxQ065698@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Fri Aug 6 23:38:12 2010 New Revision: 210979 URL: http://svn.freebsd.org/changeset/base/210979 Log: Move the man page into the new files/ subdirectory Added: user/dougb/portmaster/files/portmaster.8 - copied unchanged from r210978, user/dougb/portmaster/portmaster.8 Deleted: user/dougb/portmaster/portmaster.8 Copied: user/dougb/portmaster/files/portmaster.8 (from r210978, user/dougb/portmaster/portmaster.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/dougb/portmaster/files/portmaster.8 Fri Aug 6 23:38:12 2010 (r210979, copy of r210978, user/dougb/portmaster/portmaster.8) @@ -0,0 +1,892 @@ +.\" Copyright (c) 2006-2010 Doug Barton dougb@FreeBSD.org +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 9, 2010 +.Dt PORTMASTER 8 +.Os +.Sh NAME +.Nm portmaster +.Nd manage your ports without external databases or languages +.Sh SYNOPSIS +Common Flags: +.Op Fl -force-config CGHgntvw [B|b] [f|i] [D|d] +.Op [[--packages|-P]|[--packages-only|-PP]] | [--packages-build] +.Op Fl -packages-if-newer +.Op Fl -delete-build-only +.Op Fl -always-fetch +.Op Fl -local-packagedir=<path> +.Op Fl -packages-local +.Op Fl -delete-packages +.Op Fl -no-confirm +.Op Fl -no-term-title +.Op Fl -no-index-fetch +.Op --index|--index-first|--index-only +.Op Fl m Ar arguments for make +.Op Fl x Ar glob pattern to exclude from building +.Nm +.Op Common Flags +.Ar full name of port directory in /var/db/pkg +.Nm +.Op Common Flags +.Ar full path to /usr/ports/foo/bar +.Nm +.Op Common Flags +.Ar glob pattern of directories from /var/db/pkg +.Pp +PLEASE NOTE: Glob patterns now update every port that matches. +This is a change from pre-version-2.3 behavior. +.Pp +.Nm +.Op Common Flags +.Ar Multiple full names or paths from /usr/ports or /var/db/pkg, +and/or multiple globs from /var/db/pkg +.Nm +.Op Common Flags + . (Use in /usr/ports/foo/bar to build that port) +.Nm +.Fl -show-work +.Op Fl Gv m Ar args +<single port, as above> +.Nm +.Op Common Flags +.Fl o Ar <new port dir in /usr/ports> <installed port> +.Nm +.Op Common Flags +.Op Fl R +.Fl r Ar name/glob of port in /var/db/pkg +.Nm +.Op Common Flags +.Fl a +.Nm +.Fl -delete-build-only +.Nm +.Op Fl -packages-if-newer +.Op Fl -always-fetch +.Op Fl -local-packagedir=<path> +.Op Fl -packages-local +.Op Fl -delete-packages +.Fl P|--packages +.Nm +.Op Fl -packages-if-newer +.Op Fl -always-fetch +.Op Fl -local-packagedir=<path> +.Op Fl -packages-local +.Op Fl -delete-packages +.Fl PP|--packages-only +.Nm +.Op Fl -packages-if-newer +.Op Fl -always-fetch +.Op Fl -local-packagedir=<path> +.Op Fl -packages-local +.Op Fl -delete-packages +.Fl -packages-build +.Nm +.Fl [l|L] +.Nm +.Op Fl b [D|d] +.Fl e Ar name/glob of port directory in /var/db/pkg +.Nm +.Op Fl b [D|d] +.Fl s +.Nm +.Fl -clean-distfiles +.Nm +.Fl -clean-distfiles-all +.Nm +.Fl -check-depends +.Nm +.Fl -check-port-dbdir +.Op Fl v +.Nm +.Fl -list-origins +.Nm +.Fl h|--help +.Nm +.Fl -version +.Pp +The +.Qq glob +patterns mentioned above are not regular expressions. +For example: +.Qq portmaster perl +would match every port dirctory name in +.Pa /var/db/pkg +that fits the pattern +.Qq /var/db/pkg/perl* . +.Sh QUICK START GUIDE +This manual contains a lot of valuable information about +.Nm , +and you should read the entire manual to give you a better +idea about how it works and what choices are available to you. +However in the interests of getting you started quickly +please see the EXAMPLES section at the end of the manual. +.Sh DESCRIPTION +The +.Nm +utility is a tool for updating your ports. +It does not use an external database to track what you +have installed. +Rather it uses the existing ports infrastructure, +including what is located in +.Pa /var/db/pkg . +The focus of this tool is to keep the dependency +tracking information for your ports up to date. +This allows you to safely update a specific port without +having to update all of the ports +.Qq above +it. +In the rare case where you do need to recompile +ports which depend on a port you are updating, +the +.Fl r +option exists to accomplish this. +.Pp +By default +.Nm +updates the port you specify on the command line. +This will occur +whether there is a new version for it or not. +It will first recurse through the port +and all of its dependencies (if any) to handle +any port OPTIONS via the 'make config' interface. +You will be presented with an OPTIONS dialog if +you have never built the port before, +or if the OPTIONS have changed. +You can force dialogs for all ports by using the +.Fl -force-config +option. +.Pp +While recursing through dependencies, +if you are not using any of the +.Fl -packages* +options, +a 'make checksum' process will be launched +in the background to either verify that the +correct distfiles are available +or start downloading the new ones. +If you stop +.Nm +with ^C, an attempt will be made to kill off +the child processes started for this purpose. +.Pp +While checking dependencies if a port has CONFLICTS +set they will be compared to your installed ports +and if you already have an alternate version of the dependency +that is required by the port you are building +it will be used in place of the default dependency. +.Pp +When the config and dependency checking phase is over the +user will be presented with a list of ports that will be +installed and/or upgraded, and asked to approve +before proceeding. +This behavior can be supressed with the +.Fl -no-confirm +option. +.Pp +If the dependency check +does not find a port that needs updating +that step will be skipped prior +to building the port(s) specified on the command line. +In addition to this optimization, +information about up-to-date dependencies, +choices made on which ports to build for +interactive mode, +and ports already visited for 'make config' are +all cached to enhance performance and prevent +duplicated efforts. +.Pp +While recursing through the dependencies, +if a port is marked IS_INTERACTIVE this will +be flagged. +In the absence of this notification, +under normal circumstances the only user interaction +required after the port starts building is to answer +questions about the deletion of stale distfiles. +This can be eliminated with the +.Fl d +or +.Fl D +options. +.Pp +There are a number of +.Fl -packages* +options available to save the time that would normally +be spent building the port(s). +Users interested in a reasonable balance between speed of +installation and maximum performance should consider the +.Fl -packages-build +option, perhaps combined with the +.Fl -delete-build-only +option. +.Pp +If there is no +.Fl B +option specified when updating an existing port, +a backup package will be created before +.Xr pkg_delete 1 +is called. +If you are using the +.Fl b +option, these packages can be found in a directory called +.Qq portmaster-backup +in the directory specified by the +.Ev PACKAGES +environment variable, usually +.Pa /usr/ports/packages . +If there is no +.Fl b +option specified, the backup package will be deleted +once the new version of the port is successfully installed. +If the installation fails for whatever reason, +a helpful message will be printed, along with instructions +on where to find the backup package. +.Pp +After the port is built, if the +.Fl w +option is being used, all shared libraries installed +by the old port (if any) will be saved to +.Pa /usr/local/lib/compat/pkg . +After installation if there are any new files with +the same names as those in +.Pa /usr/local/lib/compat/pkg +the old files will be deleted, +and +.Xr ldconfig 8 +will be run via +.Pa /etc/rc.d/ldconfig . +.Pp +After the new port is built, but before it is installed +the runtime dependencies will be checked to make sure +they are up to date. +If the +.Fl g +option is used a package will be created for the new +(or newly installed) version. +.Pp +When installing a port or using the +.Fl -check-depends +option, if there are other ports that depend on this port +the dependent ports +.Pa +CONTENTS +file(s), and the +.Pa +REQUIRED_BY +file for the new port will be updated. +.Pp +At the conclusion of a successful installation, +any +.Pa pkg-message +files that were installed, +and a summary of the work performed will be displayed. +If the +.Fl -delete-build-only +option is in use, those packages that were installed during +the current run of +.Nm +AND were only ever listed as build dependencies during this +run will be deleted. +.Pp +If something goes wrong during the process +(e.g., a port build fails, a port is marked BROKEN) +.Nm +will report any work done successfully as described above, +then exit. +.Pp +The question is often asked, +.Dq Why is it not possible to proceed with the ports that do not have errors? +The answer is that (unfortunately) +.Nm +is not omniscient, and cannot guess what resolution the +user would like to have for this problem. +Manual intervention is therefore required. +.Sh OPTIONS +The options are as follows: +.Bl -tag -width F1 +.It Fl -force-config +run 'make config' for all ports +.It Fl B +prevents creation of the backup package for the installed port +.It Fl C +prevents 'make clean' from being run before building +.It Fl G +prevents the recursive 'make config' (overrides +.Fl -force-config ) +.It Fl H +hide details of the port build and install in a log file +.It Fl K +prevents 'make clean' from being run after building +.It Fl b +create and keep a backup package of an installed port +.It Fl g +create a package of the new port +.It Fl n +run through configure, but do not make or install any ports +.It Fl t +recurse dependencies thoroughly, using all-depends-list +.It Fl v +verbose output +.It Fl w +save old shared libraries before deinstall +.It Fl u +This option has been deprecated. +It did very little previously, and not what most users expected. +Please check the +.Fl d +and +.Fl D +options to achieve most of the same effect. +.It [-R] Fl f +always rebuild ports (overrides +.Fl i ) +.It Fl i +interactive update mode -- ask whether to rebuild ports +.It Fl D +no cleaning of distfiles +.It Fl d +always clean distfiles +.It Fl m Ar arguments for make +any arguments to supply to +.Xr make 1 +.It Fl x +avoid building or updating ports that match this pattern. +Can be specified more than once. +If a port is not already installed the exclude pattern will +be run against the directory name from +.Pa /usr/ports . +.It Fl p Ar port directory in /usr/ports +This option has been deprecated. +.It Fl -show-work +show what dependent ports are, and are not installed (implies +.Fl t ) . +.It Fl o Ar <new port dir in /usr/ports> <installed port> +replace the installed port with a port from a different origin +.It [-R] Fl r Ar name/glob of port directory in /var/db/pkg +rebuild the specified port, and all ports that depend on it +.It Fl R +used with the +.Fl r +or +.Fl f +options to skip ports updated on a previous run. +.It Fl a +check all ports, update as necessary +.It Fl -delete-build-only +delete ports that are build-only dependencies after a successful run, +only if installed this run +.It Fl P|--packages +use packages, but build port if not available +.It Fl PP|--packages-only +fail if no package is available. +The +.Fl PP +option must stand alone on the command line. +In other words, you cannot do +.Fl PPav +(for example). +.It Fl -packages-build +use packages for all build dependencies +.It Fl -packages-if-newer +use package if newer than installed even if the package is not +the latest according to the ports tree +.It Fl -always-fetch +fetch package even if it already exists locally +.It Fl -local-packagedir=<path> +where local packages can be found, +will fall back to fetching if no local version exists. +This option should point to the full path of a directory structure +created in the same way that 'make package' (or the +.Nm +.Fl g +option) creates it. +I.e., the package files are contained in +.Pa <path>/All , +there are LATEST_LINK symlinks in the +.Pa <path>/Latest +directory, and symlinks to the packages in +.Pa <path>/All +in the category subdirectories, such as +.Pa <path>/devel , +.Pa <path>/ports-mgmt , +etc. +.It Fl -packages-local +use packages from +.Fl -local-packagedir +only +.It Fl -delete-packages +after installing from a package, delete it +.It Fl -no-confirm +do not ask the user to confirm the list of ports to +be installed and/or updated before proceeding +.It Fl -no-term-title +do not update the xterm title bar +.It Fl -no-index-fetch +skip fetching the INDEX file +.It Fl -index +use INDEX-[6-9] exclusively to check if a port is up to date +.It Fl -index-first +use the INDEX for status, but double-check with the port +.It Fl -index-only +do not try to use +.Pa /usr/ports . +For updating ports when no +.Pa /usr/ports +directory is present the +.Fl PP|--packages-only +option is required. +See the ENVIRONMENT section below for additional +requirements. +.It Fl l +list all installed ports by category +.It Fl L +list all installed ports by category, and search for updates +.It Fl e Ar name/glob of port directory in /var/db/pkg +expunge port using +.Xr pkg_delete 1 , +and optionally remove all distfiles. +Calls +.Fl s +after it is done expunging in case removing +the port causes a dependency to no longer be +necessary. +.It Fl s +clean out stale ports that used to be depended on +.It Fl F +fetch distfiles only. +Cannot be used with +.Fl G , +but may be used with +.Fl -force-config +and +.Fl [aftv] . +.It Fl -clean-distfiles +recurse through the installed ports to get a list +of distinfo files, +then recurse through all files in +.Pa /usr/ports/distfiles +to make sure that they are still associated with +an installed port. +If not, offer to delete the stale file. +.It Fl -clean-distfiles-all +does the same as above, but deletes all files without prompting. +.It Fl -check-depends +cross-check and update dependency information for all ports +.It [-v] Fl -check-port-dbdir +check for stale entries in +.Pa /var/db/ports +.It Fl -list-origins +list directories from /usr/ports for root and leaf ports. +This list is suitable for feeding to +.Nm +either on another machine or for reinstalling all ports. +See EXAMPLES below. +.It Fl h|--help +display help message +.It Fl -version +display the version only. +.El +.Sh ENVIRONMENT +The directory pointed to by the +.Ev PACKAGES +variable (by default +.Pa /usr/ports/packages ) +will be used to store new and backup packages. +When using 'make package' for the +.Fl g +option, the ports infrastructure will store packages in +.Pa /usr/ports/packages/All , +aka +.Ev PKGREPOSITORY . +When using the +.Fl b +option, +.Nm +stores its backup packages in +.Pa /usr/ports/packages/portmaster-backup +so that you can create both a backup package and +a package of the newly installed port even if they +have the same version. +.Pp +When using the +.Fl -packages* +options the package files will be downloaded to +.Pa ${PACKAGES}/portmaster-download . +.Nm +will respect the +.Ev PACKAGESITE +and +.Ev PACKAGEROOT +(by default http://ftp.freebsd.org) variables. +.Nm +attempts to use both of these variables in the same +way that +.Xr pkg_add 1 +does. +.Pp +The +.Ev UPGRADE_TOOL +variable is set to +.Qq Nm , +and the +.Ev UPGRADE_PORT +and +.Ev UPGRADE_PORT_VER +variables +are set to the full package name string and version +of the existing package being replaced, if any. +.Pp +When using the +.Fl -index-only +option the +.Ev PACKAGES +and +.Ev INDEXDIR +variables must each be set to a dirctory where the +superuser has write permissions. +Other useful variables include: +.Bd -literal +MASTER_SITE_INDEX (default http://www.FreeBSD.org/ports/) +FETCHINDEX (default fetch -am -o) +INDEXFILE (default auto per FreeBSD version) +.Ed +.Sh FILES +.Bl -tag -width "1234" -compact +.It Pa /usr/local/etc/portmaster.rc +.It Pa $HOME/.portmasterrc +Optional system and user configuration files. +The variables set in the script's getopts routine +can be specified in these files to enable those options. +These files will be read by the parent +.Nm +process, and all variables +in them will be exported. +.Pp +PLEASE NOTE: In versions before 2.3 +.Pa /etc/portmaster.rc +was recommended. +However placing this file in LOCALBASE is the correct +thing to do. +In future versions of +.Nm +support for +.Pa /etc/portmaster.rc +will be removed. +.Pp +Here are examples of variables that are likely to be useful, +along with their related options. +.Pp +.Bd -literal +# Sample portmaster rc file. +# Place in $HOME/.portmasterrc or /usr/local/etc/portmaster.rc +# +# Do not create temporary backup packages before pkg_delete (-B) +# NO_BACKUP=Bopt +# +# Always save the backup packages of the old port (-b) +# BACKUP=bopt +# +# Make and save a package of the new port (-g) +# MAKE_PACKAGE=gopt +# +# Do not preclean the port's build directory (-C) +# DONT_PRE_CLEAN=Copt +# +# Do not clean the port's build directory after installation (-K) +# DONT_POST_CLEAN=Kopt +# +# Never search for stale distfiles to delete (-D) +# DONT_SCRUB_DISTFILES=Dopt +# +# Always delete stale distfiles without prompting (-d) +# ALWAYS_SCRUB_DISTFILES=dopt +# +# Do not run 'make config' for ports that need updating (-G) +# (This unsets --force-config) +# NO_RECURSIVE_CONFIG=Gopt +# +# Hide the build and install processes in a log file (-H) +# HIDE_BUILD=Hopt +# +# Arguments to pass to make (-m) +# PM_MAKE_ARGS='-DFORCE_PKG_REGISTER' +# +# Recurse through every dependency, and child dependencies (-t) +# RECURSE_THOROUGH=topt +# +# Be verbose (-v) +# PM_VERBOSE=vopt +# +# Save copies of old shared libraries (recommended) (-w) +# SAVE_SHARED=wopt +# +# Install a package if available (-P or --packages) +# PM_PACKAGES=first +# +# Only install packages (-PP or --packages-only) +# PM_PACKAGES=only +# +# Install packages for build-only dependencies (--packages-build) +# PM_PACKAGES_BUILD=pmp_build +# +# Delete build-only dependencies when finished (--delete-build-only) +# PM_DEL_BUILD_ONLY=pm_dbo +# +# Use packages if they are newer than installed (--packages-newer) +# PM_PACKAGES=newer +# PM_PACKAGES_NEWER=pmp_newer +# +# Always fetch new package files (--always-fetch) +# PM_ALWAYS_FETCH=pm_always_fetch +# +# Specify a local package repository (--local-packagedir) +# LOCAL_PACKAGEDIR=<path> +# +# Only use packages from --local-packagedir (--packages-local) +# PM_PACKAGES_LOCAL=pmp_local +# +# Delete packages after they are installed (--delete-packages) +# PM_DELETE_PACKAGES=pm_delete_packages +# +# Suppress the build confirmation message (--no-confirm) +# PM_NO_CONFIRM=pm_no_confirm +# +# Do not update the xterm title bar (--no-term-title) +# PM_NO_TERM_TITLE=pm_no_term_title +# +# Do not fetch the INDEX file (--no-index-fetch) +# PM_NO_INDEX_FETCH=pm_no_index_fetch +# +# Use only the INDEX file to check if a port is out of date (--index) +# PM_INDEX=pm_index +# +# Use the INDEX file first, then check /usr/ports (--index-first) +# PM_INDEX=pm_index +# PM_INDEX_FIRST=pm_index_first +# +# Use the INDEX file instead of /usr/ports (--index-only) +# PM_INDEX=pm_index +# PM_INDEX_ONLY=pm_index_only +.Ed +.Pp +.It Pa /var/db/pkg/*/+IGNOREME +If this file exists for a port that is already installed, +several things will happen: +.Bl -tag -width F1 +.It 1. The port will be ignored for all purposes. +This includes dependency updates even if there is no +directory for the port in +.Pa /usr/ports +and there is no entry for it in +.Pa /usr/ports/MOVED . +If the +.Fl v +option is used, the fact that the port is being ignored +will be mentioned. +.It 2. If using the +.Fl L +option, and a new version exists, the existence of the +.Pa +IGNOREME +file will be mentioned. +.It 3. If you do a regular update of the port, or if the +.Fl a +option is being used you will be asked if you want to +update the port anyway. +.El +.Pp +.It Pa /var/db/pkg/*/PM_UPGRADE_DONE_FLAG +Indicates to a subsequent +.Fl a , +.Fl f , +or +.Fl r +run which includes the +.Fl R +option that a port has already been rebuilt, +so it can be safely ignored if it is up to date. +.Pp +.It Pa /tmp/port_log-* +If the +.Fl H +option is used, and the installation or upgrade is not +successful, the results of the build and install will be +saved in this file. +Substitute the value of +.Ev TMPDIR +in your environment as appropriate. +.El +.Sh EXIT STATUS +.Ex -std +.Sh ADVANCED FEATURE: SU_CMD +The ports infrastructure has limited support for performing +various operations as an unpriviliged user. +It does this by defining SU_CMD, which is typically +.Xr su 1 . +In order to support complete management of your ports as an +unprivileged user, escalating to +.Qq root +privileges only when necessary, +.Nm +can use +.Xr sudo 1 +to handle the escalated privileges. +To accomplish this you must have the following directories +configured so that the unprivileged user can access them: +.Bl -tag -width F1 +.It 1. WRKDIRPREFIX - This is usually set to Pa /usr/ports/category/port/work , +however it is suggested that you configure another +directory outside your ports tree for access by the +unprivileged user, and assign this variable +to that value in your +.Pa /etc/make.conf . +.It 2. DISTDIR - This is usually set to Pa /usr/ports/distfiles . +This directory can be safely set up for access by the unprivileged +user, or a new directory can be specified as above. +.It 3. TMPDIR - Usually Pa /tmp , +but can also be set to another directory in your shell +environment if desired. +.El +.Pp +It is further assumed that the following directories will be +owned by root: +.Bl -tag -width F1 +.It Pa /var/db/pkg +.It Pa /var/db/ports +.It LOCALBASE - Usually Pa /usr/local +.It PACKAGES - Usually Pa /usr/ports/packages +.It PKGREPOSITORY - Usually Pa ${PACKAGES}/All +.El +.Pp +You will then need to install and configure +.Xr sudo 1 . +This can easily be done with +.Pa /usr/ports/security/sudo . +Then you will need to define PM_SU_CMD in your +.Pa /etc/portmaster.rc +file, or your +.Pa $HOME/.portmasterrc +file. +For example: +.Pp +.Dl "PM_SU_CMD=/usr/local/bin/sudo" +.Pp +You can optionally define the PM_SU_VERBOSE option as well +to notify you each time +.Nm +uses the PM_SU_CMD. +This is particularly useful if you are experimenting with +a tool other than +.Xr sudo 1 +to handle the privilege escalation, although at this time +.Xr sudo 1 +is the only supported option. +.Pp +PLEASE NOTE: You cannot upgrade the +.Xr sudo 1 +port itself using this method. +.Sh EXAMPLES +The following are examples of typical usage +of the +.Nm +command: +.Pp +Update one port: +.Dl "portmaster fooport-1.23" +.Dl "portmaster fooport" +.Dl "portmaster foo/fooport" +.Pp +Use a package if available: +.Dl "portmaster --packages fooport-1.23" +.Pp +Update multiple ports: +.Dl "portmaster fooport-1.23 barport baz/blahport" +.Pp +Build a port locally but use packages for build dependencies, +then delete the build dependencies when finished: +.Dl "portmaster --packages-build --delete-build-only fooport-1.23" +.Pp +Update a system using only packages that are available locally: +.Dl "portmaster -PP --local-packagedir=<path> -a" +.Pp +Update all ports that need updating: +.Dl "portmaster -a" +.Pp +Update all ports that need updating, and delete stale +distfiles after the update is done: +.Dl "portmaster -aD" +.Dl "portmaster --clean-distfiles" +.Pp +More complex tasks (please see the details for these options above): +.Dl "portmaster -r fooport-1.23" +.Dl "portmaster -o emulators/linux_base-fc4 linux_base-8-8.0_15" +.Dl "portmaster -x cvsup -f -a" +.Dl "portmaster -a -x gstreamer -x linux" +.Pp +Print only the ports that have available updates. +This can be used as an alias in your shell. +Be sure to fix the line wrapping appropriately. +.Dl "portmaster -L |" +.Dl "egrep -B1 '(ew|ort) version|Aborting|installed|dependencies|" +.Dl "IGNORE|marked|Reason:|MOVED|deleted' | grep -v '^--'" +.Pp +Using +.Nm +to do a complete reinstallation of all your ports: +.Dl "1. portmaster --list-origins > ~/installed-port-list" +.Dl "2. Update your ports tree" +.Dl "3. portmaster --clean-distfiles-all" +.Dl "4. portmaster --check-port-dbdir" +.Dl "5. portmaster -Faf" +.Dl "6. pkg_delete '*'" +.Dl "7. rm -rf /usr/local/lib/compat/pkg" +.Dl "8. Manually check /usr/local and /var/db/pkg" +.Dl " to make sure that they are really empty" +.Dl "9. Re-install portmaster" +.Dl "10. portmaster `cat ~/installed-port-list`" +.Pp +You probably want to use the -D option for the installation +and then run --clean-distfiles[-all] again when you are done. +You might also want to consider using the --force-config option +when installing the new ports. +.Pp +Alternatively you could use +.Nm Fl a Fl f Fl D +to do an +.Dq in place +update of your ports. +If that process is interrupted for any reason you can use +.Nm Fl a Fl f Fl D Fl R +to avoid rebuilding ports already rebuilt on previous runs. +However the first method (delete everything and reinstall) is preferred. +.Sh SEE ALSO +.Xr make 1 , +.Xr pkg_add 1 , +.Xr pkg_delete 1 , +.Xr su 1 , +.Xr ports 7 , +.Xr ldconfig 8 , +.Xr sudo 8 +.Sh AUTHORS +This +manual page was written by +.An Doug Barton <dougb@FreeBSD.org> .
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008062338.o76NcCxQ065698>