Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 402341 - sys-devel/crossdev stores EXTRA_ECONF options w/o quotes
Summary: sys-devel/crossdev stores EXTRA_ECONF options w/o quotes
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-06 04:00 UTC by René Berber
Modified: 2012-02-16 04:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description René Berber 2012-02-06 04:00:16 UTC
Minor bug in crossdev, as the title says its storing the options I
passed without the quotes.  That means emerge spills some messages about
'command not found' referring to the second options on those lines.

Here's an example of what I'm doing (mind you it doesn't work for what
its intended -- i.e. the mingw-w64 tools are not quite right, they are
missing the 32 bit libc++ and other details):

$ sudo crossdev -t x86_64-w64-mingw32 \
> --b 2.22 --g 4.6.2 \
> --benv
EXTRA_ECONF="--enable-targets=x86_64-w64-mingw32,i686-w64-mingw32" \
> --genv EXTRA_ECONF="--enable-multilib --enable-targets=all" \
> --lenv EXTRA_ECONF="--enable-lib64 --enable-lib32"
That command succeeds.

Later using emerge for my weekly update:

/etc/portage/env/cross-x86_64-w64-mingw32/mingw64-runtime: line 2:
--enable-lib32: command not found
/etc/portage/env/cross-x86_64-w64-mingw32/gcc: line 2:
--enable-targets=all: command not found

And the offending lines:

$ head -n 2 /etc/portage/env/cross-x86_64-w64-mingw32/mingw64-runtime
/etc/portage/env/cross-x86_64-w64-mingw32/gcc
==> /etc/portage/env/cross-x86_64-w64-mingw32/mingw64-runtime <==
SYMLINK_LIB=no
EXTRA_ECONF=--enable-lib64 --enable-lib32

==> /etc/portage/env/cross-x86_64-w64-mingw32/gcc <==
SYMLINK_LIB=no
EXTRA_ECONF=--enable-multilib --enable-targets=all

Same thing with /etc/portage/env/cross-x86_64-w64-mingw32/binutils (but
emerge didn't spill anything about it).

Reproducible: Always

Steps to Reproduce:
1. Use crossdev with some extra options, more than one.
2. Use emerge for anything.
3. See the first lines output by emerge.
Actual Results:  
The options where stored without quoting them, emerge sets those options, the second (and subsequent) option is taken a separate command.

Expected Results:  
No messages about these options.
Comment 1 SpanKY gentoo-dev 2012-02-14 20:25:06 UTC
this is behaving (mostly) as intended

idea was to do:
  --benv 'VAR="some values"\nSOMETHING="more stuff"'

in your example below, there's no way of supporting multiple variables.  obviously this won't work:
  --genv EXTRA_ECONF="--enable-multilib --enable-targets=all" CFLAGS="-pipe"

you need to pass that in as a single argument:
  --genv 'EXTRA_ECONF="--enable-multilib --enable-targets=all" CFLAGS="-pipe"'

i've added a little more info to the --help output

http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commitdiff;h=17661edff9a8933975ada3f4b1448d132aa0f050
Comment 2 René Berber 2012-02-14 21:42:04 UTC
(In reply to comment #1)
> this is behaving (mostly) as intended
> 
> idea was to do:
>   --benv 'VAR="some values"\nSOMETHING="more stuff"'
> 
> in your example below, there's no way of supporting multiple variables. 
> obviously this won't work:
>   --genv EXTRA_ECONF="--enable-multilib --enable-targets=all" CFLAGS="-pipe"
[snip]

And where did you get the CFLAGS from?  I certainly didn't use it, and you seem to be missing the point: its multiple parameters not multiple environment variables.
Comment 3 SpanKY gentoo-dev 2012-02-15 04:09:13 UTC
(In reply to comment #2)

no, i'm afraid you seemed to miss the point.  the --env flags take multiple variables, not just one you happen to want to set.
Comment 4 René Berber 2012-02-15 04:11:28 UTC
(In reply to comment #3)
> (In reply to comment #2)
> 
> no, i'm afraid you seemed to miss the point.  the --env flags take multiple
> variables, not just one you happen to want to set.

My report is about multiple parameters set in one variable missing the required quotes.  No mention of multiple variables.
Comment 5 SpanKY gentoo-dev 2012-02-16 04:34:11 UTC
(In reply to comment #4)

and i'm afraid you missed the point then.  current behavior is working as intended.  use the syntax i suggested to make it work for you.