summaryrefslogtreecommitdiff
path: root/queryconfig
diff options
context:
space:
mode:
authorHyunggi Lee <hyunggi.lee@samsung.com>2021-05-31 17:12:52 +0900
committerHyunggi Lee <hyunggi.lee@samsung.com>2021-05-31 17:12:52 +0900
commitbce6211b24b63fdc1b4e365ca2b46e27f07ac79a (patch)
tree2967b2e73a87ddedb749c05b14062dfbb63b5740 /queryconfig
parent1cf9b6b4612246afd28d5e92065c1e6af0604456 (diff)
downloadbuild-bce6211b24b63fdc1b4e365ca2b46e27f07ac79a.tar.gz
build-bce6211b24b63fdc1b4e365ca2b46e27f07ac79a.tar.bz2
build-bce6211b24b63fdc1b4e365ca2b46e27f07ac79a.zip
Allow BuildFlags: Buildflags: flag:key to pass an arg
cherry-pick queyconfig only. From b70ff4d443ecb83c0c47f935a301c44dec3aad0e Mon Sep 17 00:00:00 2001 From: Michael Schroeder <mls@suse.de> Date: Mon, 19 Oct 2020 16:02:59 +0200 Subject: [PATCH] Support ENV and ARG in Dockerfile Allow BuildFlags: dockerbuildarg:key=value to pass an arg to the build command. --- Build/Docker.pm | 61 +++++++++++++++++++++++++++++++++++++-------- build-recipe-docker | 14 +++++++++-- queryconfig | 5 ++++ 3 files changed, 68 insertions(+), 12 deletions(-) Change-Id: I96bade8f06088d11ccb2f7c57dee5449876537a0 Signed-off-by: Hyunggi Lee <hyunggi.lee@samsung.com>
Diffstat (limited to 'queryconfig')
-rwxr-xr-xqueryconfig5
1 files changed, 5 insertions, 0 deletions
diff --git a/queryconfig b/queryconfig
index f130931..f470605 100755
--- a/queryconfig
+++ b/queryconfig
@@ -61,6 +61,11 @@ if ($type eq 'buildflags') {
die("Specify which buildflag to query\n") unless $argument;
my $result = $cf->{"buildflags:$argument"};
print "$result\n" if defined $result;
+} elsif ($type eq 'buildflags+') {
+ die("Specify which buildflag to query\n") unless $argument;
+ for (@{$cf->{'buildflags'} || []}) {
+ print "$1\n" if /\Q$argument\E:(.*)/;
+ }
} elsif ($type eq 'hostarch') {
my $result = $cf->{"hostarch"};
print "$result\n" if defined $result;