svn commit: r315660 - stable/11/tools/build/mk

Ronald Klop ronald-lists at klop.ws
Tue Mar 21 09:14:58 UTC 2017


On Tue, 21 Mar 2017 06:13:15 +0100, Ngie Cooper <ngie at freebsd.org> wrote:

> Author: ngie
> Date: Tue Mar 21 05:13:14 2017
> New Revision: 315660
> URL: https://svnweb.freebsd.org/changeset/base/315660
>
> Log:
>   MFC r314241,r315228:
>  r314241:
>  Fill in MK_RESCUE by finding paths in ${DESTDIR}/rescue and adding
>   them to OLD_FILES/OLD_DIRS, as necessary.
>  r315228:
>  Redirect standard error from find /rescue to /dev/null
>  This mutes noise from find when /rescue doesn't exist.

IMHO it is better to check the existence in an if before the find. My  
experience is that other errors will show up in the future which are then  
ignored by piping to /dev/null.

Ronald.


>
> Modified:
>   stable/11/tools/build/mk/OptionalObsoleteFiles.inc
> Directory Properties:
>   stable/11/   (props changed)
>
> Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc
> ==============================================================================
> --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc	Tue Mar 21  
> 03:42:28 2017	(r315659)
> +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc	Tue Mar 21  
> 05:13:14 2017	(r315660)
> @@ -7131,9 +7131,14 @@ OLD_FILES+=usr/share/man/man1/rlog.1.gz
>  OLD_FILES+=usr/share/man/man5/rcsfile.5.gz
>  .endif
> -#.if ${MK_RESCUE} == no
> -# to be filled in or replaced with a special target
> -#.endif
> +.if ${MK_RESCUE} == no
> +. if exists(${DESTDIR}${TESTSBASE})
> +RESCUE_DIRS!=find ${DESTDIR}/rescue -type d 2>/dev/null | sed -e  
> 's,^${DESTDIR}/,,'; echo
> +OLD_DIRS+=${RESCUE_DIRS}
> +RESCUE_FILES!=find ${DESTDIR}/rescue \! -type d 2>/dev/null | sed -e  
> 's,^${DESTDIR}/,,'; echo
> +OLD_FILES+=${RESCUE_FILES}
> +. endif
> +.endif
> .if ${MK_ROUTED} == no
>  OLD_FILES+=rescue/routed
> _______________________________________________
> svn-src-all at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"


More information about the svn-src-all mailing list