Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101486 - make.conf isn't a bash file
Summary: make.conf isn't a bash file
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Documentation (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-05 14:26 UTC by Fabio Rossi
Modified: 2005-08-25 08:02 UTC (History)
1 user (show)

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 Fabio Rossi 2005-08-05 14:26:24 UTC
It's better to write a note in the installation handbook and in make.conf.5  
stating that make.conf is not a bash file. Infact multiline definitions of
variables are not supported. Read my discussion with Aaron in the bug #100373

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Shyam Mani (RETIRED) gentoo-dev 2005-08-05 14:39:34 UTC
I don't see the point of this in the installation handbook. Re-assigning to the
portage team to fix man make.conf if they see it fit to do so.

This kind of info is way too advanced for the handbook IMHO, as far as the docs
go, this is a WONTFIX.
Comment 2 Fabio Rossi 2005-08-05 14:53:34 UTC
I read in the handbook this note about the format of make.conf:

<< As you probably noticed, the make.conf.example file is structured in a
generic way: commented lines start with "#", other lines define variables using
the VARIABLE="content" syntax. The make.conf file uses the same syntax. >>

The reader can think that variable definitions are like those ones of a bash file
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2005-08-05 14:54:37 UTC
It's bash compatible (it can be parsed by bash), so such a statement would be 
incorrect (how do you define a "bash file"?) 
Multiline vars are supported in make.conf. 
Comment 4 SpanKY gentoo-dev 2005-08-05 19:52:54 UTC
we should make a note that having multiple CFLAGS or CXXFLAGS or such will break
many packages though
Comment 5 Marius Mauch (RETIRED) gentoo-dev 2005-08-05 20:57:13 UTC
Any test case? I don't see how packages could be broken by this as bash/shlex
should collapse it back into single-line vars, so packages would never see a
difference, no?
Comment 6 SpanKY gentoo-dev 2005-08-05 21:34:26 UTC
most configure scripts will blow up with newlines in CFLAGS

# CFLAGS='-pipe -Os'$'\n''-Wall' emerge sed
<snip>
configure: creating ./config.status
config.status: creating bootstrap.sh
sed: file ./confstatxsZ7xZ/subs-2.sed line 9: unterminated `s' command
config.status: creating Makefile
sed: file ./confstatxsZ7xZ/subs-2.sed line 9: unterminated `s' command
<snip>
make: *** No targets.  Stop.

!!! ERROR: sys-apps/sed-4.1.4 failed.
!!! Function src_compile, Line 62, Exitcode 2
!!! build failed
Comment 7 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-10 08:58:42 UTC
Ahhh this is relevant from the standpoint of bug 101416
Comment 8 Ed Catmur 2005-08-25 08:02:48 UTC
re comment 6: yes, on the command line - but portage_util.varexpand strips them
from make.conf.