Author: delphij
Date: Mon Jun 29 18:44:15 2015
New Revision: 284936
URL: https://svnweb.freebsd.org/changeset/base/284936

Log:
  MFC r284425:
  
  Skip src component if /usr/src is empty.
  
  Submitted by:         kczekirda
  Reviewed by:          cperciva, delphij, nwhitehorn, allanjude

Modified:
  stable/10/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 29 18:34:30 
2015        (r284935)
+++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 29 18:44:15 
2015        (r284936)
@@ -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
 }
 
@@ -2634,10 +2642,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
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to