Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 338555 - sys-apps/portage: warn about make.conf syntax that is not shell-compatible
Summary: sys-apps/portage: warn about make.conf syntax that is not shell-compatible
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Documentation (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-24 13:37 UTC by Attila Stehr
Modified: 2021-04-09 21:51 UTC (History)
2 users (show)

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


Attachments
output of euses (euses.out,2.30 KB, text/plain)
2010-09-24 19:39 UTC, Attila Stehr
Details
my make.conf (make.conf,1.78 KB, text/plain)
2010-09-24 19:40 UTC, Attila Stehr
Details
emerge --info (emerge.info,10.30 KB, text/plain)
2010-09-24 19:42 UTC, Attila Stehr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Stehr 2010-09-24 13:37:15 UTC
see URL

Reproducible: Always

Steps to Reproduce:
1.euses boundschecking
2.
3.
Comment 1 Attila Stehr 2010-09-24 13:43:41 UTC
URL corrected

example from make.conf: 
CFLAGS=   "-O2 -pipe march=core2"
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2010-09-24 14:46:09 UTC
Please post/attach all relevant information right here.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2010-09-24 15:48:56 UTC
euses correctly assumes shell compatibility of make.conf, only it isn't documented anywhere and sys-apps/portage doesn't mind. So we should document this restriction.
Comment 4 Zac Medico gentoo-dev 2010-09-24 16:04:19 UTC
The getconfig() function already has a warning about \r characters. We should add warnings for other shell incompatibilities as well.
Comment 5 Attila Stehr 2010-09-24 19:39:20 UTC
Created attachment 248544 [details]
output of euses
Comment 6 Attila Stehr 2010-09-24 19:40:37 UTC
Created attachment 248546 [details]
my make.conf
Comment 7 Attila Stehr 2010-09-24 19:42:50 UTC
Created attachment 248547 [details]
emerge --info
Comment 8 Attila Stehr 2010-09-24 19:47:55 UTC
Um, couldn't you please alter euses the way that it just filters space and tab? I remember that at least one other portage tool was altered that way too...
Comment 9 Attila Stehr 2010-09-24 19:59:06 UTC
(see bug #105069 please)
Comment 10 Zac Medico gentoo-dev 2010-09-25 08:49:48 UTC
(In reply to comment #8)
> Um, couldn't you please alter euses the way that it just filters space and tab?
> I remember that at least one other portage tool was altered that way too...

Well, now that this is assigned to dev-portage you'll also probably want to convince us not to produce warnings about this syntax? What's wrong with requiring shell-compatible syntax?
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2010-09-25 15:07:08 UTC
(In reply to comment #8)
> Um, couldn't you please alter euses the way that it just filters space and tab?
> I remember that at least one other portage tool was altered that way too...

The standard has always been that make.conf is shell compatible, only we never put that in writing.

If you want to change this de facto standard, then you will need to bring this up on the gentoo-dev mailing list and get some kind of majority to support the change. And you will have to propose a proper new standard too, not just request that spaces in variable assignments are to be allowed.
Comment 12 Attila Stehr 2010-09-26 02:29:37 UTC
Well, the only reason I can tell now is that the suggested behaviour would be more user friendly.
If bringing the topic to the mailing list is an option I'll think about that.

For the time being an 
alias euses='PORTDIR=/var/portage euses'
put into the .bashrc works (same for eix-update - but that's another story).

As well I set the severity to 'enhancement' if that's ok for you.
Comment 13 Alexander Berntsen (RETIRED) gentoo-dev 2013-08-11 21:37:46 UTC
Version no longer in Portage.
Comment 14 Alexander Berntsen (RETIRED) gentoo-dev 2016-02-02 15:12:47 UTC
Zac, any ideas on how to solve this simply (implementation-wise)? If you have any pointers/advice I can work on it later.
Comment 15 Zac Medico gentoo-dev 2021-04-09 21:36:56 UTC
(In reply to Alexander Berntsen (RETIRED) from comment #14)
> Zac, any ideas on how to solve this simply (implementation-wise)? If you
> have any pointers/advice I can work on it later.

Maybe this library will help:

https://github.com/sloria/environs

We can use it when available, and otherwise fallback to our existing portage.util.getconfig() implementation.