[Cook] Cook find-command fails if a directory in the path is not readable
Susanne Oberhauser
froh at SuSE.de
Thu Jun 9 19:03:10 EST 2005
Hi,
in the SUSE package build for ageis, the aegis test suite chokes on
behaviour of find_command in cook-2.25:
If a directory in $PATH is not accessible EACCES to the cook user,
find_command fails, and the code in
cook-2.25/cook/builtin/find_command.c tells it to:
static string_ty *
look_for_exe(prog)
string_ty *prog;
{
int j;
const char *suffix;
string_ty *s;
int ok;
for (j = 0; ; ++j)
{
suffix = exeext_nth(j);
if (!suffix)
return 0;
s = str_format("%S%s", prog, suffix);
ok = os_exists(s);
if (ok < 0)
ret_value = -1;
/**********************************************
this is any of: EACCESS, ENAMETOOLONG or
ELOOP !?!?
**********************************************/
if (ok)
return s;
str_free(s);
}
}
Is this intentional?
The $SHELLs for example don't fail but ignore non-existing path
components.
If this is intentional, then the aegis regression tests needs to set
$PATH to a well-defined value, else the regression test fails for
non-obvious reasons.
Susanne
--
Susanne Oberhauser +49-911-74053-574 SUSE LINUX GmbH
Novell Developer Services developer.novell.com Maxfeldstraße 5
Linux Engineering www.suse.de 90409 Nürnberg
More information about the Cook-users
mailing list