Bug#93696: include command's search path is broken
Package: chpp
Version: 0.3.4-1
>From the documentation:
- Command: include FILENAME
Includes the file FILENAME. If FILENAME is relative, it is first
searched for in the directory of the including file, then in the
directories contained in the include search path (*note Invoking
chpp::.). If the file is not found, an error message is produced.
>From real life usage:
Lets say I have a file named example.chpp which contains the command
#include /etc/gdefs.conf
$ cat example.chpp | strace chpp
...
open("/usr/lib/chpp/include//etc/gdefs.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
open(".//etc/gdefs.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/gdefs.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
...
Not only is that not the documented search path, the fact that an absolute
path was given is completely ignored. If the included file has a relative
path the search path doesn't change, it still looks in
/usr/lib/chpp/include first, then in the local directory.
--
Jamie Heilman http://audible.transient.net/~jamie/
"...thats the metaphorical equivalent of flopping your wedding tackle
into a lion's mouth and flicking his lovespuds with a wet towel, pure
insanity..." -Rimmer
Reply to: