Summary: | Bug in the mkdir portion of the sandbox | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Caleb Tennis (RETIRED) <caleb> |
Component: | Sandbox | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 35836 |
Description
Caleb Tennis (RETIRED)
![]() I have tried the fix and it worked on my machine. It's reasonable... You cannot assume errno is valid unless the system call returns an error condition... you're checking success in your patch... which would mean that the directory was stat'd. I'm not sure about returning EEXIST... but non-zero is probably fine as long as you set errno... which is done. returning errno is wrong, mkdir should return -1 on failure and set errno. Things really go wrong if not. e.g. all cvs ebuilds are broken with this patch. This works: --- libsandbox.c 2004-03-22 02:40:58.000000000 +0100 +++ /home/jeffrey/libsandbox.c 2004-04-07 01:56:41.000000000 +0200 @@ -476,7 +476,7 @@ /* Check if the directory exist, return EEXIST rather than failing */ if (0 == lstat(canonic, &st)) { errno = EEXIST; - return errno; + return -1 } errno = my_errno; I tried cvs ebuild with your patched sandbox But it failed(same error). Any idea? the 'cvs is not creating directories one at a time' warning followed by ther 'there is already a version in foobar' error? In that case, weird, works fine here, kde-cvs is emerging fine here right now. If you get another error, try to remove your cvs repository first and check it out again.. In my case cvs had completely messed up the CVS/* directories I encountered the error. Hmm, I'll try it again.. can anyone try it too? Bug has been fixed and released in stable portages on or before 2.0.51-r2 |