From owner-svn-src-user@FreeBSD.ORG Sun Dec 6 23:28:49 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90763106574E; Sun, 6 Dec 2009 23:28:49 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC888FC08; Sun, 6 Dec 2009 23:28:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB6NSn0G034951; Sun, 6 Dec 2009 23:28:49 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB6NSnlV034948; Sun, 6 Dec 2009 23:28:49 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200912062328.nB6NSnlV034948@svn.freebsd.org> From: Doug Barton Date: Sun, 6 Dec 2009 23:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200192 - user/dougb/portmaster X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2009 23:28:49 -0000 Author: dougb Date: Sun Dec 6 23:28:49 2009 New Revision: 200192 URL: http://svn.freebsd.org/changeset/base/200192 Log: Don't say that we're buildin a port when we're using packages Don't rely on -v to print the message about checking the package repo since that can take a long time Modified: user/dougb/portmaster/portmaster user/dougb/portmaster/portmaster.8 Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sun Dec 6 23:27:24 2009 (r200191) +++ user/dougb/portmaster/portmaster Sun Dec 6 23:28:49 2009 (r200192) @@ -1829,6 +1829,16 @@ create_master_rb_list () { [ -n "$MASTER_RB_LIST" ] && export MASTER_RB_LIST=" $MASTER_RB_LIST" } +pca () { + if [ "$PM_PACKAGES" = only ]; then + echo install + elif [ -n "$PM_PACKAGES" ]; then + echo 'build and/or install' + else + echo build + fi +} + multiport () { # Global PM_MULTI_PORTS=':' ; PM_MULTI_BUILT=':' @@ -1893,7 +1903,7 @@ multiport () { check_fetch_only unset CONFIG_SEEN_LIST CONFIG_ONLY echo '' - echo "===>>> Starting build for multiple ports <<<===" + echo "===>>> Starting `pca` for multiple ports <<<===" echo '' if [ -n "$PM_BUILD_ONLY_LIST" ]; then @@ -2050,7 +2060,7 @@ all_config () { unset CONFIG_SEEN_LIST CONFIG_ONLY echo '' - echo "===>>> Starting build for ports that need updating <<<===" + echo "===>>> Starting `pca` for ports that need updating <<<===" echo '' fi @@ -2366,7 +2376,7 @@ if [ -n "$CONFIG_ONLY" ]; then check_fetch_only unset CONFIG_SEEN_LIST CONFIG_ONLY - echo "===>>> Starting build for $portdir <<<===" + echo "===>>> Starting `pca` for $portdir <<<===" echo '' fi @@ -2481,7 +2491,6 @@ fetch_package () { sitepath="${sitepath%/}/${portdir%/*}/" - [ -n "$PM_VERBOSE" ] && echo "===>>> Checking package repository for latest available version" if [ -n "$LOCAL_PACKAGEDIR" ]; then Modified: user/dougb/portmaster/portmaster.8 ============================================================================== --- user/dougb/portmaster/portmaster.8 Sun Dec 6 23:27:24 2009 (r200191) +++ user/dougb/portmaster/portmaster.8 Sun Dec 6 23:28:49 2009 (r200192) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 15, 2009 +.Dd December 1, 2009 .Dt PORTMASTER 8 .Os .Sh NAME @@ -33,6 +33,11 @@ .Sh SYNOPSIS Common Flags: .Op Fl -force-config CGHgntvw [B|b] [f|i] [D|d] +.Op Fl [--packages|--packages-only] [-P|-PP] | [--packages-build] +.Op Fl -packages-if-newer +.Op Fl -delete-build-only +.Op Fl -always-fetch +.Op Fl -local-packagedir= .Op Fl m Ar arguments for make .Op Fl x Ar glob pattern to exclude from building .Nm @@ -70,6 +75,23 @@ and/or multiple globs from /var/db/pkg .Op Common Flags .Fl a .Nm +.Fl -delete-build-only +.Nm +.Op Fl -packages-if-newer +.Op Fl -always-fetch +.Op Fl -local-packagedir= +.Fl P|--packages +.Nm +.Op Fl -packages-if-newer +.Op Fl -always-fetch +.Op Fl -local-packagedir= +.Fl PP|--packages-only +.Nm +.Op Fl -packages-if-newer +.Op Fl -always-fetch +.Op Fl -local-packagedir= +.Fl -packages-build +.Nm .Fl [l|L] .Nm .Op Fl b [D|d] @@ -109,8 +131,8 @@ Rather it uses the existing ports infras 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, -which allows you to update a specific port without +tracking information for your ports up to date. +This allows you to update a specific port without having to update all of the ports .Qq above it. @@ -136,6 +158,9 @@ option. It will then start building all ports that need updating. 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, @@ -146,7 +171,7 @@ with ^C, an attempt will be made to kill the child processes started for this purpose. .Pp If the recursion through the ports for 'make -config' does not find a port that needs updating, +config' does not find a port that needs updating the dependency check step will be skipped prior to building the port specified on the command line. In addition to this optimization, @@ -176,6 +201,17 @@ and if you have installed an alternate v that is required by the port you are building, it will be used in place of the default dependency. .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, @@ -234,17 +270,25 @@ 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 therefore cannot guess what resolution the +is not omniscient, and cannot guess what resolution the user would like to have for this problem. Manual intervention is therefore required. Assuming that the failure occurred after the config phase has ended @@ -256,7 +300,7 @@ option to the command line to skip the c The options are as follows: .Bl -tag -width F1 .It Fl -force-config -run 'make config' for all ports (must be the first option) +run 'make config' for all ports .It Fl B prevents creation of the backup package for the installed port .It Fl C @@ -307,13 +351,10 @@ If a port is not already installed the e be run against the directory name from .Pa /usr/ports . .It Fl p Ar port directory in /usr/ports -specify the full path to a port directory. -This option is generally not necessary and may be -removed in future versions. +This option has been deprecated. .It Fl -show-work show what dependent ports are, and are not installed (implies .Fl t ) . -This flag must come first on the command line. .It Fl o Ar replace the installed port with a port from a different origin .It [-R] Fl r Ar name/glob of port in /var/db/pkg @@ -326,6 +367,23 @@ or 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 +.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= +where local packages can be found, +will fall back to fetching if no local version exists .It Fl l list all installed ports by category .It Fl L