diff options
author | Xin LI <delphij@FreeBSD.org> | 2015-06-15 20:12:15 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2015-06-15 20:12:15 +0000 |
commit | 5a74378c7b0b679c34e9729233297773e9818dff (patch) | |
tree | 565ca7cad98df40420d166921ff3cf93d8ef7f2c /usr.sbin/freebsd-update | |
parent | cdea5d8c84d0e0714ed06a7b84d7253bae8f9f65 (diff) | |
download | src-5a74378c7b0b679c34e9729233297773e9818dff.tar.gz src-5a74378c7b0b679c34e9729233297773e9818dff.zip |
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
Notes
Notes:
svn path=/head/; revision=284425
Diffstat (limited to 'usr.sbin/freebsd-update')
-rw-r--r-- | usr.sbin/freebsd-update/freebsd-update.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index fda1d9049db2..19d519881e79 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -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 |