[OpenWrt-Devel] [PATCH] include/toplevel.mk: fix defconfig when ~/.openwrt/defconfig exists

Felix Fietkau nbd at nbd.name
Mon Jul 4 05:34:37 EDT 2016


On 2016-07-04 11:27, John Crispin wrote:
> ./scripts/feeds update will reset the .config file if ~/.openwrt/defconfig
> exists, thus resetting the target to ar71xx.
> 
> Signed-off-by: John Crispin <john at phrozen.org>
> ---
> 
> i am not sure if this is correct or if refresh_config() inside scripts
> feeds should be called with a paramter to not run defconfig
> ---
>  include/toplevel.mk |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/toplevel.mk b/include/toplevel.mk
> index 581083d..398fba7 100644
> --- a/include/toplevel.mk
> +++ b/include/toplevel.mk
> @@ -110,7 +110,7 @@ config-clean: FORCE
>  
>  defconfig: scripts/config/conf prepare-tmpinfo FORCE
>  	touch .config
> -	@if [ -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi
> +	@if [  \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi
Use -s instead of -e for .config here. -e will always be true since it's
called after the touch command above.

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list