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>
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;