From owner-svn-src-user@FreeBSD.ORG Mon May 2 06:14:52 2011 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 01B6610656FD; Mon, 2 May 2011 06:14:52 +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 E76538FC0A; Mon, 2 May 2011 06:14:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p426EpS2024669; Mon, 2 May 2011 06:14:51 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p426Ep87024667; Mon, 2 May 2011 06:14:51 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201105020614.p426Ep87024667@svn.freebsd.org> From: Doug Barton Date: Mon, 2 May 2011 06:14:51 +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: r221313 - 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: Mon, 02 May 2011 06:14:52 -0000 Author: dougb Date: Mon May 2 06:14:51 2011 New Revision: 221313 URL: http://svn.freebsd.org/changeset/base/221313 Log: If -F --packages-only and there is no package to fetch, give the user a menu of options Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Mon May 2 05:39:43 2011 (r221312) +++ user/dougb/portmaster/portmaster Mon May 2 06:14:51 2011 (r221313) @@ -3464,7 +3464,29 @@ fetch_package () { echo '' echo " Check the pkg_add(1) man page for information" echo " on setting the PACKAGESITE environment variable" - [ "$PM_PACKAGES" = only ] && fail $ponly_err + [ "$PM_PACKAGES" = only -a -z "$FETCH_ONLY" ] && fail $ponly_err + if [ -n "$FETCH_ONLY" ]; then + while [ -z "$continue" ]; do + echo -e "\n===>>> There is no valid package to install\n" + echo "===>>> Abort update [a]" + echo "===>>> Retry fetch [r]" + echo "===>>> Continue if possible [c]" + echo '' + echo -n "===>>> How would you like to proceed? [a] " + read answer ; echo '' + + case "$answer" in + a|'') fail "No package exists for $new_port" ;; + r) if fetch_package $new_port try ; then + latest_pv=$new_port + continue=continue + fi ;; + c) safe_exit ;; + *) echo " ===>>> $answer is not a valid response" ;; + esac + done + unset continue answer + fi else latest_pv=${latest_pv#*href=\"} latest_pv=${latest_pv%%\.tbz*}