Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 182809

Summary: gentoo-bashcomp should use 'source' to grab make.conf vars
Product: Gentoo Linux Reporter: Jason Dusek <jason.dusek>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: enhancement CC: gianni.costanzi, ingmar, shell-tools, tristan
Priority: High Keywords: InVCS
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Uses 'source' instead of 'sed' in '_portdir()'

Description Jason Dusek 2007-06-21 19:02:52 UTC
Right now, gentoo-bashcomp uses sed to grab variables from make.conf but this is inflexible. I propose using 'source' instead.
Comment 1 Jason Dusek 2007-06-21 19:04:17 UTC
Created attachment 122721 [details, diff]
Uses 'source' instead of 'sed' in '_portdir()'
Comment 2 Tristan Heaven (RETIRED) gentoo-dev 2008-01-06 20:37:30 UTC
portageq ?
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2008-01-06 20:53:05 UTC
Hmm well I first of all fail to see what kind of flexibility is sourcing the file supposed to bring, as opposed to sed.
Comment 4 Jason Dusek 2008-01-22 06:31:18 UTC
(In reply to comment #3)
> I first of all fail to see what kind of flexibility is sourcing the
> file supposed to bring, as opposed to sed.

It is syntactically legal to define make.conf vars on more then one line, but it messes up the bash completion script -- you get a hard to trace error. That's why I changed it (and still use a modded up gentoo-bashcomp). I don't like files with more than 78 columns :)
Comment 5 Jason Dusek 2008-01-28 03:05:29 UTC
(In reply to comment #2)
> portageq ?

What?
Comment 6 Tristan Heaven (RETIRED) gentoo-dev 2008-01-28 15:20:07 UTC
It could get the variables by running portageq but it is a bit slow.
Comment 7 Tristan Heaven (RETIRED) gentoo-dev 2008-01-28 16:13:14 UTC
*** Bug 187678 has been marked as a duplicate of this bug. ***
Comment 8 marty rosenberg 2008-04-14 14:48:28 UTC
(In reply to comment #3)
> Hmm well I first of all fail to see what kind of flexibility is sourcing the
> file supposed to bring, as opposed to sed.
> 

another thing; there would need to be a alarge amount of hacking in order to get the correct behaviour if you have local overlays and layman overlays where you end up with PORTDIR_OVERLAY="$PORTDIR_OVERLAY $FOOBAR" or some other form of variable assignment (FOO+=$BAR) and whatnot.  the patch works perfectly.
Comment 9 Federico Ferri (RETIRED) gentoo-dev 2008-04-20 12:18:25 UTC
++
Comment 10 Tristan Heaven (RETIRED) gentoo-dev 2008-05-21 19:03:24 UTC
Fixed, thanks.