* [Buildroot] [PATCH 1/3] ccache: replace BUILDROOT_CACHE_DIR with BR_CACHE_DIR.
@ 2014-02-04 15:18 Arnout Vandecappelle
2014-02-04 15:18 ` [Buildroot] [PATCH 2/3] infra: replace BUILDROOT_DL_DIR with BR2_DL_DIR Arnout Vandecappelle
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2014-02-04 15:18 UTC (permalink / raw)
To: buildroot
To make the naming consistent (qstripped variant of a config option
should be named BR_XXX).
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Makefile | 4 ++--
package/ccache/ccache.mk | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 4a675d4..15d110e 100644
--- a/Makefile
+++ b/Makefile
@@ -316,8 +316,8 @@ TARGET_DIR_WARNING_FILE=$(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
ifeq ($(BR2_CCACHE),y)
CCACHE:=$(HOST_DIR)/usr/bin/ccache
-BUILDROOT_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
-export BUILDROOT_CACHE_DIR
+BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
+export BR_CACHE_DIR
HOSTCC := $(CCACHE) $(HOSTCC)
HOSTCXX := $(CCACHE) $(HOSTCXX)
endif
diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk
index 82a53f3..40485d1 100644
--- a/package/ccache/ccache.mk
+++ b/package/ccache/ccache.mk
@@ -22,16 +22,16 @@ CCACHE_LICENSE_FILES = LICENSE.txt GPL-3.0.txt
HOST_CCACHE_CONF_OPT += ccache_cv_zlib_1_2_3=no
# Patch host-ccache as follows:
-# - Use BUILDROOT_CACHE_DIR instead of CCACHE_DIR, because CCACHE_DIR
+# - Use BR_CACHE_DIR instead of CCACHE_DIR, because CCACHE_DIR
# is already used by autotargets for the ccache package.
-# BUILDROOT_CACHE_DIR is exported by Makefile based on config option
+# BR_CACHE_DIR is exported by Makefile based on config option
# BR2_CCACHE_DIR.
# - ccache shouldn't use the compiler binary mtime to detect a change in
# the compiler, because in the context of Buildroot, that completely
# defeats the purpose of ccache. Of course, that leaves the user
# responsible for purging its cache when the compiler changes.
define HOST_CCACHE_PATCH_CONFIGURATION
- sed -i 's,getenv("CCACHE_DIR"),getenv("BUILDROOT_CACHE_DIR"),' $(@D)/ccache.c
+ sed -i 's,getenv("CCACHE_DIR"),getenv("BR_CACHE_DIR"),' $(@D)/ccache.c
sed -i 's,getenv("CCACHE_COMPILERCHECK"),"none",' $(@D)/ccache.c
endef
--
1.9.rc1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/3] infra: replace BUILDROOT_DL_DIR with BR2_DL_DIR.
2014-02-04 15:18 [Buildroot] [PATCH 1/3] ccache: replace BUILDROOT_CACHE_DIR with BR_CACHE_DIR Arnout Vandecappelle
@ 2014-02-04 15:18 ` Arnout Vandecappelle
2014-02-09 10:03 ` Peter Korsgaard
2014-02-04 15:18 ` [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG Arnout Vandecappelle
2014-02-05 11:08 ` [Buildroot] [PATCH 1/3] ccache: replace BUILDROOT_CACHE_DIR with BR_CACHE_DIR Peter Korsgaard
2 siblings, 1 reply; 10+ messages in thread
From: Arnout Vandecappelle @ 2014-02-04 15:18 UTC (permalink / raw)
To: buildroot
To make the naming consistent (all user-visible options should be
prefixed BR2_).
An entry is added to Makefile.legacy to warn users who have set
BUILDROOT_DL_DIR but not BR2_DL_DIR.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Config.in | 2 +-
Makefile | 7 +++++++
Makefile.legacy | 16 ++++++++++++++++
docs/manual/common-usage.txt | 2 +-
docs/manual/download-location.txt | 8 ++++----
package/pkg-download.mk | 9 ++-------
6 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/Config.in b/Config.in
index 7ec7c2a..1dc1ffe 100644
--- a/Config.in
+++ b/Config.in
@@ -126,7 +126,7 @@ config BR2_DL_DIR
default "$(TOPDIR)/dl"
help
Directory to store all the source files that we need to fetch.
- If the Linux shell environment has defined the BUILDROOT_DL_DIR
+ If the Linux shell environment has defined the BR2_DL_DIR
environment variable, then this overrides this configuration item.
The default is $(TOPDIR)/dl
diff --git a/Makefile b/Makefile
index 15d110e..a3fc0db 100644
--- a/Makefile
+++ b/Makefile
@@ -121,6 +121,13 @@ else
$(shell echo BR2_EXTERNAL ?= $(BR2_EXTERNAL) > $(BR2_EXTERNAL_FILE))
endif
+# To make sure the the environment variable overrides the .config option,
+# set this before including .config.
+ifneq ($(BR2_DL_DIR),)
+DL_DIR := $(BR2_DL_DIR)
+endif
+
+
# Need that early, before we scan packages
# Avoids doing the $(or...) everytime
BR2_GRAPH_OUT := $(or $(GRAPH_OUT),pdf)
diff --git a/Makefile.legacy b/Makefile.legacy
index e0b7ec2..4954398 100644
--- a/Makefile.legacy
+++ b/Makefile.legacy
@@ -13,6 +13,22 @@ $(error "You have legacy configuration in your .config! Please check your config
endif
#
+# Legacy options from 2014.02
+#
+
+# The BUILDROOT_DL_DIR environment variable was renamed by BR2_DL_DIR. We
+# want to detect someone using the old variable, _except_ if also the new
+# variable was set. By the time we get here, however, we no longer have
+# access to the BR2_DL_DIR environment variable (because it has been overridden
+# by the .config inclusion). However, the environment variable (if defined) was
+# saved in DL_DIR, so we can use that.
+ifneq ($(BUILDROOT_DL_DIR),)
+ifneq ($(BUILDROOT_DL_DIR),$(DL_DIR))
+$(error "The BUILDROOT_DL_DIR environment variable was renamed to BR2_DL_DIR.")
+endif
+endif
+
+#
# Legacy options from 2012.08
#
diff --git a/docs/manual/common-usage.txt b/docs/manual/common-usage.txt
index 1d15c05..127060d 100644
--- a/docs/manual/common-usage.txt
+++ b/docs/manual/common-usage.txt
@@ -80,7 +80,7 @@ to +make+ or set in the environment:
configuration interface, so through the Buildroot +.config+ file; this
is the recommended way of setting it.
+
-* +BUILDROOT_DL_DIR+ to override the directory in which
+* +BR2_DL_DIR+ to override the directory in which
Buildroot stores/retrieves downloaded files
+
Note that the Buildroot download directory can also be set from the
diff --git a/docs/manual/download-location.txt b/docs/manual/download-location.txt
index 4aa8cea..21055c1 100644
--- a/docs/manual/download-location.txt
+++ b/docs/manual/download-location.txt
@@ -13,14 +13,14 @@ filesystem with exactly the same versions.
If you maintain several Buildroot trees, it might be better to have a
shared download location. This can be achieved by pointing the
-+BUILDROOT_DL_DIR+ environment variable to a directory. If this is
++BR2_DL_DIR+ environment variable to a directory. If this is
set, then the value of +BR2_DL_DIR+ in the Buildroot configuration is
overridden. The following line should be added to +<~/.bashrc>+.
-----------------
- $ export BUILDROOT_DL_DIR <shared download location>
+ $ export BR2_DL_DIR <shared download location>
-----------------
The download location can also be set in the +.config+ file, with the
-+BR2_DL_DIR+ option. This value is overridden by the +BUILDROOT_DL_DIR+
-environment variable.
++BR2_DL_DIR+ option. Unlike most options in the .config file, this value
+is overridden by the +BR2_DL_DIR+ environment variable.
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 2641d4e..84598d5 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -23,13 +23,8 @@ LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))
# external-deps target.
DL_MODE=DOWNLOAD
-# Override BR2_DL_DIR if shell variable defined
-ifneq ($(BUILDROOT_DL_DIR),)
-DL_DIR := $(BUILDROOT_DL_DIR)
-else
-DL_DIR := $(call qstrip,$(BR2_DL_DIR))
-endif
-
+# DL_DIR may have been set already from the environment
+DL_DIR ?= $(call qstrip,$(BR2_DL_DIR))
ifeq ($(DL_DIR),)
DL_DIR := $(TOPDIR)/dl
endif
--
1.9.rc1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG.
2014-02-04 15:18 [Buildroot] [PATCH 1/3] ccache: replace BUILDROOT_CACHE_DIR with BR_CACHE_DIR Arnout Vandecappelle
2014-02-04 15:18 ` [Buildroot] [PATCH 2/3] infra: replace BUILDROOT_DL_DIR with BR2_DL_DIR Arnout Vandecappelle
@ 2014-02-04 15:18 ` Arnout Vandecappelle
2014-02-05 8:30 ` Jeremy Rosen
2014-02-09 16:00 ` Peter Korsgaard
2014-02-05 11:08 ` [Buildroot] [PATCH 1/3] ccache: replace BUILDROOT_CACHE_DIR with BR_CACHE_DIR Peter Korsgaard
2 siblings, 2 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2014-02-04 15:18 UTC (permalink / raw)
To: buildroot
To make the naming consistent (all user-visible options should be
prefixed with BR2_).
An entry is added to Makefile.legacy to warn users who have set
BUILDROOT_CONFIG but not BR2_CONFIG.
Still export BUILDROOT_CONFIG but pointing to some phony value, to
make sure that scripts that still use it fail in a predictable way.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Makefile | 20 ++++++++++----------
Makefile.legacy | 12 ++++++++++++
docs/manual/customize-rootfs.txt | 4 ++--
docs/manual/debugging-buildroot.txt | 2 +-
support/dependencies/dependencies.sh | 10 +++++-----
support/kconfig/confdata.c | 2 +-
.../patches/01-kconfig-kernel-to-buildroot.patch | 2 +-
support/scripts/mkusers | 4 ++--
8 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/Makefile b/Makefile
index a3fc0db..d10f4e8 100644
--- a/Makefile
+++ b/Makefile
@@ -152,11 +152,11 @@ LEGAL_LICENSES_TXT_HOST=$(LEGAL_INFO_DIR)/host-licenses.txt
LEGAL_WARNINGS=$(LEGAL_INFO_DIR)/.warnings
LEGAL_REPORT=$(LEGAL_INFO_DIR)/README
-BUILDROOT_CONFIG=$(CONFIG_DIR)/.config
+BR2_CONFIG=$(CONFIG_DIR)/.config
# Pull in the user's configuration file
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
--include $(BUILDROOT_CONFIG)
+-include $(BR2_CONFIG)
endif
# To put more focus on warnings, be less verbose as default
@@ -331,7 +331,7 @@ endif
# Scripts in support/ or post-build scripts may need to reference
# these locations, so export them so it is easier to use
-export BUILDROOT_CONFIG
+export BR2_CONFIG
export TARGET_DIR
export STAGING_DIR
export HOST_DIR
@@ -428,7 +428,7 @@ $(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
$(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR)
-$(BUILD_DIR)/buildroot-config/auto.conf: $(BUILDROOT_CONFIG)
+$(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
$(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
prepare: $(BUILD_DIR)/buildroot-config/auto.conf
@@ -628,7 +628,7 @@ legal-info-prepare: $(LEGAL_INFO_DIR)
@$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPLv2+,COPYING,not saved,HOST)
@$(call legal-warning,the Buildroot source code has not been saved)
@$(call legal-warning,the toolchain has not been saved)
- @cp $(BUILDROOT_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config
+ @cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config
legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \
$(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST)
@@ -685,7 +685,7 @@ COMMON_CONFIG_ENV = \
KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
- BUILDROOT_CONFIG=$(BUILDROOT_CONFIG) \
+ BR2_CONFIG=$(BR2_CONFIG) \
BR2_EXTERNAL=$(BR2_EXTERNAL)
xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
@@ -726,7 +726,7 @@ allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
- @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg
+ @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
@grep '^config BR2_PACKAGE_' Config.in.legacy | \
while read config pkg; do \
echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done
@@ -737,7 +737,7 @@ randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
- @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg
+ @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
@grep '^config BR2_PACKAGE_' Config.in.legacy | \
while read config pkg; do \
echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done
@@ -748,7 +748,7 @@ allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
- @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg
+ @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
@$(COMMON_CONFIG_ENV) \
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
$< --allnoconfig $(CONFIG_CONFIG_IN)
@@ -820,7 +820,7 @@ endif
ifeq ($(O),output)
rm -rf $(O)
endif
- rm -rf $(BUILDROOT_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.auto.deps
+ rm -rf $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.auto.deps
help:
@echo 'Cleaning:'
diff --git a/Makefile.legacy b/Makefile.legacy
index 4954398..ea18bc6 100644
--- a/Makefile.legacy
+++ b/Makefile.legacy
@@ -28,6 +28,18 @@ $(error "The BUILDROOT_DL_DIR environment variable was renamed to BR2_DL_DIR.")
endif
endif
+# Similar to above for BUILDROOT_CONFIG, but here we have no .config equivalent.
+ifneq ($(BUILDROOT_CONFIG),)
+ifneq ($(BUILDROOT_CONFIG),$(BR2_CONFIG))
+$(error "The BUILDROOT_CONFIG environment variable was renamed to BR2_CONFIG.")
+endif
+endif
+
+# If a script is using the deprecated BUILDROOT_CONFIG, make sure it fails.
+# Add some directories in front just in case someone used dirname on it.
+BUILDROOT_CONFIG = /tmp/deprecated/The-BUILDROOT_CONFIG-environment-variable-was-renamed-to-BR2_CONFIG
+export BUILDROOT_CONFIG
+
#
# Legacy options from 2012.08
#
diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
index 450b3d5..2cbae99 100644
--- a/docs/manual/customize-rootfs.txt
+++ b/docs/manual/customize-rootfs.txt
@@ -38,7 +38,7 @@ there are a few ways to customize the resulting target filesystem.
files, you should fix that package rather than work around it with some
post-build cleanup scripts.
You may also use these variables in your post-build script:
- - +BUILDROOT_CONFIG+: the path to the Buildroot .config file
+ - +BR2_CONFIG+: the path to the Buildroot .config file
- +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+: see
xref:generic-package-reference[]
- +BUILD_DIR+: the directory where packages are extracted and built
@@ -79,7 +79,7 @@ in one of these _post-image scripts_ will require special handling
Just like for the _post-build scripts_ mentioned above, you also have
access to the following environment variables from your _post-image
-scripts_: +BUILDROOT_CONFIG+, +BUILD_DIR+, +HOST_DIR+, +STAGING_DIR+,
+scripts_: +BR2_CONFIG+, +BUILD_DIR+, +HOST_DIR+, +STAGING_DIR+,
+TARGET_DIR+, +BINARIES_DIR+ and +BASE_DIR+.
Additionally, each of the +BR2_ROOTFS_POST_BUILD_SCRIPT+ and
diff --git a/docs/manual/debugging-buildroot.txt b/docs/manual/debugging-buildroot.txt
index 5fa05b0..e558fcf 100644
--- a/docs/manual/debugging-buildroot.txt
+++ b/docs/manual/debugging-buildroot.txt
@@ -24,7 +24,7 @@ make BR2_INSTRUMENTATION_SCRIPTS="/path/to/my/script1 /path/to/my/script2"
That script has access to the following variables:
- - +BUILDROOT_CONFIG+: the path to the Buildroot .config file
+ - +BR2_CONFIG+: the path to the Buildroot .config file
- +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+: see
xref:generic-package-reference[]
- +BUILD_DIR+: the directory where packages are extracted and built
diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index 47d4d10..1875829 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -168,8 +168,8 @@ if test "${missing_progs}" = "yes" ; then
exit 1
fi
-if grep ^BR2_TOOLCHAIN_BUILDROOT=y $BUILDROOT_CONFIG > /dev/null && \
- grep ^BR2_ENABLE_LOCALE=y $BUILDROOT_CONFIG > /dev/null ; then
+if grep ^BR2_TOOLCHAIN_BUILDROOT=y $BR2_CONFIG > /dev/null && \
+ grep ^BR2_ENABLE_LOCALE=y $BR2_CONFIG > /dev/null ; then
if ! which locale > /dev/null ; then
echo
echo "You need locale support on your build machine to build a toolchain supporting locales"
@@ -182,7 +182,7 @@ if grep ^BR2_TOOLCHAIN_BUILDROOT=y $BUILDROOT_CONFIG > /dev/null && \
fi
fi
-if grep -q ^BR2_PACKAGE_CLASSPATH=y $BUILDROOT_CONFIG ; then
+if grep -q ^BR2_PACKAGE_CLASSPATH=y $BR2_CONFIG ; then
for prog in javac jar; do
if ! which $prog > /dev/null ; then
echo >&2
@@ -192,7 +192,7 @@ if grep -q ^BR2_PACKAGE_CLASSPATH=y $BUILDROOT_CONFIG ; then
done
fi
-if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BUILDROOT_CONFIG ; then
+if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then
if test ! -f /lib/ld-linux.so.2 ; then
echo
echo "Your Buildroot configuration uses pre-built tools for the x86 architecture,"
@@ -206,7 +206,7 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BUILDROOT_CONFIG ; then
fi
fi
-if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BUILDROOT_CONFIG ; then
+if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
if ! echo "int main(void) {}" | gcc -m32 -x c - ; then
echo
echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries."
diff --git a/support/kconfig/confdata.c b/support/kconfig/confdata.c
index 4b41fe6..2371fa8 100644
--- a/support/kconfig/confdata.c
+++ b/support/kconfig/confdata.c
@@ -64,7 +64,7 @@ static void conf_message(const char *fmt, ...)
const char *conf_get_configname(void)
{
- char *name = getenv("BUILDROOT_CONFIG");
+ char *name = getenv("BR2_CONFIG");
return name ? name : ".config";
}
diff --git a/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch b/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch
index 6f545e2..ecfe76b 100644
--- a/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch
+++ b/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch
@@ -88,7 +88,7 @@ Index: kconfig/confdata.c
const char *conf_get_configname(void)
{
- char *name = getenv("KCONFIG_CONFIG");
-+ char *name = getenv("BUILDROOT_CONFIG");
++ char *name = getenv("BR2_CONFIG");
return name ? name : ".config";
}
diff --git a/support/scripts/mkusers b/support/scripts/mkusers
index 3b287b8..9dd8d24 100755
--- a/support/scripts/mkusers
+++ b/support/scripts/mkusers
@@ -39,7 +39,7 @@ GROUP="${TARGET_DIR}/etc/group"
# with /etc/group, so any use of gshadow must be conditional.
GSHADOW="${TARGET_DIR}/etc/gshadow"
-# We can't simply source ${BUILDROOT_CONFIG} as it may contains constructs
+# We can't simply source ${BR2_CONFIG} as it may contains constructs
# such as:
# BR2_DEFCONFIG="$(CONFIG_DIR)/defconfig"
# which when sourced from a shell script will eventually try to execute
@@ -48,7 +48,7 @@ GSHADOW="${TARGET_DIR}/etc/gshadow"
# So, we have to scan that file instead. Sigh... :-(
PASSWD_METHOD="$( sed -r -e '/^BR2_TARGET_GENERIC_PASSWD_METHOD="(.*)"$/!d;' \
-e 's//\1/;' \
- "${BUILDROOT_CONFIG}" \
+ "${BR2_CONFIG}" \
)"
#----------------------------------------------------------------------------
--
1.9.rc1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG.
2014-02-04 15:18 ` [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG Arnout Vandecappelle
@ 2014-02-05 8:30 ` Jeremy Rosen
2014-02-05 8:34 ` Arnout Vandecappelle
2014-02-09 16:00 ` Peter Korsgaard
1 sibling, 1 reply; 10+ messages in thread
From: Jeremy Rosen @ 2014-02-05 8:30 UTC (permalink / raw)
To: buildroot
----- Mail original -----
> To make the naming consistent (all user-visible options should be
> prefixed with BR2_).
>
> An entry is added to Makefile.legacy to warn users who have set
> BUILDROOT_CONFIG but not BR2_CONFIG.
>
> Still export BUILDROOT_CONFIG but pointing to some phony value, to
> make sure that scripts that still use it fail in a predictable way.
>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
I tested with my script which has the following code
BR2_RASPAUDIO_PAACCESS="$( sed -r -e '/^BR2_RASPAUDIO_PAACCESS="(.*)"$/!d;' \
-e 's//\1/;' \
"${BUILDROOT_CONFIG}" \
)"
which is adapted from the mkusers script... and it failed silently.
I am not sure how to deal with the situation. I don't really see a better
way, but silently failing in a case where I copied what is done in mainline
seems a bad idea...
Regards
Jeremy Rosne
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG.
2014-02-05 8:30 ` Jeremy Rosen
@ 2014-02-05 8:34 ` Arnout Vandecappelle
2014-02-05 9:24 ` Jeremy Rosen
0 siblings, 1 reply; 10+ messages in thread
From: Arnout Vandecappelle @ 2014-02-05 8:34 UTC (permalink / raw)
To: buildroot
On 05/02/14 09:30, Jeremy Rosen wrote:
>
>
>
> ----- Mail original -----
>> To make the naming consistent (all user-visible options should be
>> prefixed with BR2_).
>>
>> An entry is added to Makefile.legacy to warn users who have set
>> BUILDROOT_CONFIG but not BR2_CONFIG.
>>
>> Still export BUILDROOT_CONFIG but pointing to some phony value, to
>> make sure that scripts that still use it fail in a predictable way.
>>
>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>> ---
>
>
> I tested with my script which has the following code
>
> BR2_RASPAUDIO_PAACCESS="$( sed -r -e '/^BR2_RASPAUDIO_PAACCESS="(.*)"$/!d;' \
> -e 's//\1/;' \
> "${BUILDROOT_CONFIG}" \
> )"
>
>
> which is adapted from the mkusers script... and it failed silently.
Really silently? sed should complain on stderr that the file doesn't
exist, but indeed the script will continue with an empty
BR2_RASPAUDIO_PAACCESS variable.
>
> I am not sure how to deal with the situation. I don't really see a better
> way, but silently failing in a case where I copied what is done in mainline
> seems a bad idea...
Hm, I also don't see a way out :-(
Regards,
Arnout
>
> Regards
>
> Jeremy Rosne
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG.
2014-02-05 8:34 ` Arnout Vandecappelle
@ 2014-02-05 9:24 ` Jeremy Rosen
2014-02-05 15:22 ` Jeremy Rosen
0 siblings, 1 reply; 10+ messages in thread
From: Jeremy Rosen @ 2014-02-05 9:24 UTC (permalink / raw)
To: buildroot
> >
> > which is adapted from the mkusers script... and it failed silently.
>
> Really silently? sed should complain on stderr that the file doesn't
> exist, but indeed the script will continue with an empty
> BR2_RASPAUDIO_PAACCESS variable.
>
I missed the message in the build log, but indeed, sed did print an
error with the usefull variable content on stderr
so this works as expected and is a case of "this is the best we can
do" since we can't proactively check the scripts...
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 1/3] ccache: replace BUILDROOT_CACHE_DIR with BR_CACHE_DIR.
2014-02-04 15:18 [Buildroot] [PATCH 1/3] ccache: replace BUILDROOT_CACHE_DIR with BR_CACHE_DIR Arnout Vandecappelle
2014-02-04 15:18 ` [Buildroot] [PATCH 2/3] infra: replace BUILDROOT_DL_DIR with BR2_DL_DIR Arnout Vandecappelle
2014-02-04 15:18 ` [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG Arnout Vandecappelle
@ 2014-02-05 11:08 ` Peter Korsgaard
2 siblings, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2014-02-05 11:08 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
> To make the naming consistent (qstripped variant of a config option
> should be named BR_XXX).
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG.
2014-02-05 9:24 ` Jeremy Rosen
@ 2014-02-05 15:22 ` Jeremy Rosen
0 siblings, 0 replies; 10+ messages in thread
From: Jeremy Rosen @ 2014-02-05 15:22 UTC (permalink / raw)
To: buildroot
oh, and by the way
Tested-by: J?r?my Rosen <jeremy.rosen@openwide.fr>
>
> > >
> > > which is adapted from the mkusers script... and it failed
> > > silently.
> >
> > Really silently? sed should complain on stderr that the file
> > doesn't
> > exist, but indeed the script will continue with an empty
> > BR2_RASPAUDIO_PAACCESS variable.
> >
>
> I missed the message in the build log, but indeed, sed did print an
> error with the usefull variable content on stderr
>
> so this works as expected and is a case of "this is the best we can
> do" since we can't proactively check the scripts...
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 2/3] infra: replace BUILDROOT_DL_DIR with BR2_DL_DIR.
2014-02-04 15:18 ` [Buildroot] [PATCH 2/3] infra: replace BUILDROOT_DL_DIR with BR2_DL_DIR Arnout Vandecappelle
@ 2014-02-09 10:03 ` Peter Korsgaard
0 siblings, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2014-02-09 10:03 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
> To make the naming consistent (all user-visible options should be
> prefixed BR2_).
> An entry is added to Makefile.legacy to warn users who have set
> BUILDROOT_DL_DIR but not BR2_DL_DIR.
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Committed, thanks. Lets hope Thomas' has updated his autobuilder script
to also set BR2_DL_DIR.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG.
2014-02-04 15:18 ` [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG Arnout Vandecappelle
2014-02-05 8:30 ` Jeremy Rosen
@ 2014-02-09 16:00 ` Peter Korsgaard
1 sibling, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2014-02-09 16:00 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
> To make the naming consistent (all user-visible options should be
> prefixed with BR2_).
> An entry is added to Makefile.legacy to warn users who have set
> BUILDROOT_CONFIG but not BR2_CONFIG.
> Still export BUILDROOT_CONFIG but pointing to some phony value, to
> make sure that scripts that still use it fail in a predictable way.
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-02-09 16:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 15:18 [Buildroot] [PATCH 1/3] ccache: replace BUILDROOT_CACHE_DIR with BR_CACHE_DIR Arnout Vandecappelle
2014-02-04 15:18 ` [Buildroot] [PATCH 2/3] infra: replace BUILDROOT_DL_DIR with BR2_DL_DIR Arnout Vandecappelle
2014-02-09 10:03 ` Peter Korsgaard
2014-02-04 15:18 ` [Buildroot] [PATCH 3/3] infra: replace BUILDROOT_CONFIG with BR2_CONFIG Arnout Vandecappelle
2014-02-05 8:30 ` Jeremy Rosen
2014-02-05 8:34 ` Arnout Vandecappelle
2014-02-05 9:24 ` Jeremy Rosen
2014-02-05 15:22 ` Jeremy Rosen
2014-02-09 16:00 ` Peter Korsgaard
2014-02-05 11:08 ` [Buildroot] [PATCH 1/3] ccache: replace BUILDROOT_CACHE_DIR with BR_CACHE_DIR Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox