From owner-svn-src-all@FreeBSD.ORG Sun Sep 9 22:09:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 182441065673; Sun, 9 Sep 2012 22:09:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0400C8FC0A; Sun, 9 Sep 2012 22:09:31 +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 q89M9U1o045397; Sun, 9 Sep 2012 22:09:30 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q89M9UTp045395; Sun, 9 Sep 2012 22:09:30 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201209092209.q89M9UTp045395@svn.freebsd.org> From: Baptiste Daroussin Date: Sun, 9 Sep 2012 22:09:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240290 - stable/9/usr.sbin/pkg X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 22:09:31 -0000 Author: bapt Date: Sun Sep 9 22:09:30 2012 New Revision: 240290 URL: http://svn.freebsd.org/changeset/base/240290 Log: MFC: r239663, r239664 change ALWAYS_ASSUME_YES to ASSUME_ALWAYS_YES for consistency with pkg(8) if not on a tty prompt about the missing pkg(8) but default on 'no' except if ASSUME_ALWAYS_YES is set Modified: stable/9/usr.sbin/pkg/pkg.c Directory Properties: stable/9/usr.sbin/pkg/ (props changed) Modified: stable/9/usr.sbin/pkg/pkg.c ============================================================================== --- stable/9/usr.sbin/pkg/pkg.c Sun Sep 9 21:00:45 2012 (r240289) +++ stable/9/usr.sbin/pkg/pkg.c Sun Sep 9 22:09:30 2012 (r240290) @@ -425,9 +425,11 @@ main(__unused int argc, char *argv[]) * not tty. Check the environment to see if user has answer * tucked in there already. */ - if (getenv("ALWAYS_ASSUME_YES") == NULL && - isatty(fileno(stdin))) { + if (getenv("ASSUME_ALWAYS_YES") == NULL) { printf("%s", confirmation_message); + if (!isatty(fileno(stdin))) + exit(EXIT_FAILURE); + if (pkg_query_yes_no() == 0) exit(EXIT_FAILURE); }