* Escaping in PACKAGECONFIG
@ 2014-11-26 18:17 Boszormenyi Zoltan
2015-01-14 12:18 ` Paul Eggleton
0 siblings, 1 reply; 3+ messages in thread
From: Boszormenyi Zoltan @ 2014-11-26 18:17 UTC (permalink / raw)
To: openembedded-devel@lists.openembedded.org
Hi,
what is the proper way of escaping a comma in the string specified for PACKAGECONFIG?
I would like to use something like the below in my custom PHP recipe:
PACKAGECONFIG[mysql] = ' \
--enable-mysqlnd="shared" \
--with-mysql="shared,mysqlnd" \
--with-mysqli="shared,mysqlnd" \
--with-mysql-sock=${localstatedir}/lib/mysql/mysql.sock \
--with-pdo-mysql="shared,mysqlnd" \
, \
,mysql5'
With ...="shared,mysqlnd", ...="shared\,mysqlnd" or ...="shared\\,mysqlnd" I get:
ERROR: Only enable,disable,depend,rdepend can be specified!
and
ERROR: Nothing PROVIDES 'mysqlnd"' (but .../php/php_5.6.3.bb DEPENDS on or otherwise
requires it). Close matches:
mysql5
ERROR: Required build target 'php' has no buildable providers.
Missing or unbuildable dependency chain was: ['php', 'mysqlnd"']
But, this works:
MYSQLND="shared,mysqlnd"
PACKAGECONFIG[mysql] = ' \
--enable-mysqlnd="shared" \
--with-mysql=${MYSQLND} \
--with-mysqli=${MYSQLND} \
--with-mysql-sock=${localstatedir}/lib/mysql/mysql.sock \
--with-pdo-mysql=${MYSQLND} \
, \
,mysql5'
Why?
Thanks in advance,
Zoltán Böszörményi
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Escaping in PACKAGECONFIG
2014-11-26 18:17 Escaping in PACKAGECONFIG Boszormenyi Zoltan
@ 2015-01-14 12:18 ` Paul Eggleton
2015-01-14 17:49 ` Burton, Ross
0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggleton @ 2015-01-14 12:18 UTC (permalink / raw)
To: Boszormenyi Zoltan; +Cc: openembedded-devel
Hi Zoltán,
On Wednesday 26 November 2014 19:17:16 Boszormenyi Zoltan wrote:
> what is the proper way of escaping a comma in the string specified for
> PACKAGECONFIG? I would like to use something like the below in my custom
> PHP recipe:
>
> PACKAGECONFIG[mysql] = ' \
> --enable-mysqlnd="shared" \
> --with-mysql="shared,mysqlnd" \
> --with-mysqli="shared,mysqlnd" \
>
> --with-mysql-sock=${localstatedir}/lib/mysql/mysql.sock \
> --with-pdo-mysql="shared,mysqlnd" \
> , \
> ,mysql5'
>
> With ...="shared,mysqlnd", ...="shared\,mysqlnd" or ...="shared\\,mysqlnd" I
> get:
>
> ERROR: Only enable,disable,depend,rdepend can be specified!
>
> and
>
> ERROR: Nothing PROVIDES 'mysqlnd"' (but .../php/php_5.6.3.bb DEPENDS on or
> otherwise requires it). Close matches:
> mysql5
> ERROR: Required build target 'php' has no buildable providers.
> Missing or unbuildable dependency chain was: ['php', 'mysqlnd"']
>
> But, this works:
>
> MYSQLND="shared,mysqlnd"
> PACKAGECONFIG[mysql] = ' \
> --enable-mysqlnd="shared" \
> --with-mysql=${MYSQLND} \
> --with-mysqli=${MYSQLND} \
>
> --with-mysql-sock=${localstatedir}/lib/mysql/mysql.sock \
> --with-pdo-mysql=${MYSQLND} \
> , \
> ,mysql5'
>
> Why?
Sorry for the delayed response. Basically, if you look at how PACKAGECONFIG is
implemented in meta/classes/base.bbclass, we simply do a python split() call
on the value of each varflag value (i.e. each individual PACKAGECONFIG[xyz]
value). However, because we get that value using getVarFlags() without passing
True for the "expand" parameter, the value is unexpanded, so variable
references such as ${MYSQLND} above won't have been expanded when the string
gets split. I'm not sure if that was intentional but it is how it has been
implemented; I don't think anyone has given much thought to cases like this
where you need to have commas in the value since it's relatively uncommon.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Escaping in PACKAGECONFIG
2015-01-14 12:18 ` Paul Eggleton
@ 2015-01-14 17:49 ` Burton, Ross
0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2015-01-14 17:49 UTC (permalink / raw)
To: OE-devel
On 14 January 2015 at 12:18, Paul Eggleton <paul.eggleton@linux.intel.com>
wrote:
> Sorry for the delayed response. Basically, if you look at how
> PACKAGECONFIG is
> implemented in meta/classes/base.bbclass, we simply do a python split()
> call
> on the value of each varflag value (i.e. each individual PACKAGECONFIG[xyz]
> value). However, because we get that value using getVarFlags() without
> passing
> True for the "expand" parameter, the value is unexpanded, so variable
> references such as ${MYSQLND} above won't have been expanded when the
> string
> gets split. I'm not sure if that was intentional but it is how it has been
> implemented; I don't think anyone has given much thought to cases like this
> where you need to have commas in the value since it's relatively uncommon.
>
FWIW, Mesa has a similar problem and that's exactly how it's solved.
Ross
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-14 17:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26 18:17 Escaping in PACKAGECONFIG Boszormenyi Zoltan
2015-01-14 12:18 ` Paul Eggleton
2015-01-14 17:49 ` Burton, Ross
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.