From owner-svn-src-head@FreeBSD.ORG Mon Jun 15 20:12:16 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 147D3EF0; Mon, 15 Jun 2015 20:12:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02A3CBB3; Mon, 15 Jun 2015 20:12:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5FKCFf2047193; Mon, 15 Jun 2015 20:12:15 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5FKCF08047192; Mon, 15 Jun 2015 20:12:15 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506152012.t5FKCF08047192@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 15 Jun 2015 20:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284425 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2015 20:12:16 -0000 Author: delphij Date: Mon Jun 15 20:12:15 2015 New Revision: 284425 URL: https://svnweb.freebsd.org/changeset/base/284425 Log: Skip src component if /usr/src is empty. Differential Revision: https://reviews.freebsd.org/D2364 Submitted by: kczekirda Reviewed by: cperciva, delphij, nwhitehorn, allanjude MFC after: 2 weeks Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 15 20:11:15 2015 (r284424) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 15 20:12:15 2015 (r284425) @@ -216,7 +216,15 @@ config_KeepModifiedMetadata () { # Add to the list of components which should be kept updated. config_Components () { for C in $@; do - COMPONENTS="${COMPONENTS} ${C}" + if [ "$C" = "src" ]; then + if [ -e /usr/src/COPYRIGHT ]; then + COMPONENTS="${COMPONENTS} ${C}" + else + echo "src component not installed, skipped" + fi + else + COMPONENTS="${COMPONENTS} ${C}" + fi done } @@ -2642,10 +2650,10 @@ install_unschg () { while read F; do if ! [ -e ${BASEDIR}/${F} ]; then continue + else + echo ${BASEDIR}/${F} fi - - chflags noschg ${BASEDIR}/${F} || return 1 - done < filelist + done < filelist | xargs chflags noschg || return 1 # Clean up rm filelist