Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59016 - ebuild.sh - senseless if then block in use_with() and use_enable()
Summary: ebuild.sh - senseless if then block in use_with() and use_enable()
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-31 12:49 UTC by Carsten Lohrke (RETIRED)
Modified: 2004-07-31 20:31 UTC (History)
0 users

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


Attachments
ebuild.sh.diff (ebuild.sh.diff,475 bytes, text/plain)
2004-07-31 12:53 UTC, Carsten Lohrke (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Lohrke (RETIRED) gentoo-dev 2004-07-31 12:49:55 UTC
local UW_SUFFIX=""	
if [ ! -z "${3}" ]; then
	UW_SUFFIX="=${3}"
fi

is the same as

UW_SUFFIX="=${3}"
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2004-07-31 12:53:10 UTC
Created attachment 36534 [details]
ebuild.sh.diff
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2004-07-31 16:57:07 UTC
Not it isn't. It will leave an equal sign of $3 is empty.
--with-blah=  is most likely not valid.
Comment 3 Carsten Lohrke (RETIRED) gentoo-dev 2004-07-31 17:16:21 UTC
oh sorry, just overlooked the equal sign :-/ but wouldn't ${3/*/=${3}} do it then?
Comment 4 Brian Harring (RETIRED) gentoo-dev 2004-07-31 20:31:14 UTC
Use ${3:+=${3}} instead.