Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375163 - sys-kernel/genkernel-3.4.16: configuration variable typo
Summary: sys-kernel/genkernel-3.4.16: configuration variable typo
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 09:52 UTC by Bjorn Rohlen
Modified: 2011-07-14 13:32 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 Bjorn Rohlen 2011-07-14 09:52:29 UTC
# Default share directory location
-GK_SHARE="/usr/share/genkernel"
+GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"

Pretty sure this should be:

GK_SHARE="${GK_SHARE}:/usr/share/genkernel"


Reproducible: Always

Steps to Reproduce:
1. Sync your tree
2. Update genkernel
Comment 1 Xake 2011-07-14 12:32:47 UTC
(In reply to comment #0)
> # Default share directory location
> -GK_SHARE="/usr/share/genkernel"
> +GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"
> 
> Pretty sure this should be:
> 
> GK_SHARE="${GK_SHARE}:/usr/share/genkernel"
> 

No, genkernel is currently correct.
GK_SHARE can only be one directory at a time (unlike $PATH which works like you specify).

In a shell, try the following as proof,

your code:

$ unset GK_SHARE
$ echo "${GK_SHARE}:/usr/share/genkernel"
:/usr/share/genkernel

Note the added ':'

$ export GK_SHARE="/tmp"
$ echo "${GK_SHARE}:/usr/share/genkernel"
/tmp:/usr/share/genkernel

Note that both entries are there seperated by a ':'
This is something genkernel is not supposed to handle, and probably never will as it does not make sense to handle it either.


The current code becomes the following:

$ unset GK_SHARE
$ echo "${GK_SHARE:-/usr/share/genkernel}"
/usr/share/genkernel
$ export GK_SHARE="/tmp"
$ echo "${GK_SHARE:-/usr/share/genkernel}"
/tmp

With other words, if GK_SHARE is specified it will be used, else genkernel will use the default entry.
Comment 2 Sebastian Pipping gentoo-dev 2011-07-14 13:32:42 UTC
To put it into other words: this is Bash's way of default values for a variable.  Compare this:

  # FOO=foo bash -c 'echo ${FOO:-bar}'
  foo

  # bash -c 'echo ${FOO:-bar}'
  bar

For more search for "%%" in "man bash".

Closing as invalid, if you don't mind.  Still, thanks for asking!