Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 3078 - Several do commands in ebuilds don't fail correctly.
Summary: Several do commands in ebuilds don't fail correctly.
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-27 13:41 UTC by Sven Moritz Hallberg
Modified: 2011-10-30 22:21 UTC (History)
0 users

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


Attachments
Patch to replace the return statement with 'exit 1'. (do-command_exit.patch,3.20 KB, patch)
2002-05-27 13:45 UTC, Sven Moritz Hallberg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Moritz Hallberg 2002-05-27 13:41:40 UTC
I noticed that a bunch of the do* scripts in /usr/lib/portage/bin/ call   
'return' on failure (They were probably once shell functions?). This is   
erroneous and results in messages like this:   
   
/usr/lib/portage/bin/dosym: two arguments needed   
/usr/lib/portage/bin/dosym: return: can only `return' from a function or   
sourced script   
 
To reproduce, simply call 
  /usr/lib/portage/bin/dosym /etc/passwd 
from a shell. This will give the above messages and call ln with a single 
argument, creating a link 'passwd' to /etc/passwd in the current directory. 
   
I've looked through all the do scripts and found the same bug in many. I  
replaced the return statements with 'exit 1'.  
I will attach a patch against my /usr/lib/portage/bin/ dir. I set up this 
Gentoo system just last week, so after checking with cvsweb, I think the files 
should all be the newest version.
Comment 1 Sven Moritz Hallberg 2002-05-27 13:45:17 UTC
Created attachment 1172 [details, diff]
Patch to replace the return statement with 'exit 1'.

Fixes the Bug.

Use with -p0 from within the portage/bin dir.
Comment 2 Daniel Robbins (RETIRED) gentoo-dev 2002-05-27 15:56:59 UTC
Fixed on CVS; will be fixed in Portage 1.9.14.  Thanks :)