Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 182809 - gentoo-bashcomp should use 'source' to grab make.conf vars
Summary: gentoo-bashcomp should use 'source' to grab make.conf vars
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: InVCS
: 187678 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-21 19:02 UTC by Jason Dusek
Modified: 2008-05-21 19:03 UTC (History)
4 users (show)

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


Attachments
Uses 'source' instead of 'sed' in '_portdir()' (patch-gentoo,751 bytes, patch)
2007-06-21 19:04 UTC, Jason Dusek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.