Hi,

after so called usrmove [1] in Fedora '/bin' is just a symlink to '/usr/bin'. Then a default $PATH includes '/bin' before '/usr/bin', which leads to the state where runtest is run under '/bin/runtest' and runtest.exp is located under '/usr/share/dejagnu/runtest.exp'.

runtest script then tries to guess location of runtest.exp, which fails, because the script searches it in: '@bindir@/../share' and '@bindir@/../../share'. Both paths are expanded to '/share' in this case, which will result in an error like that [2]:

$ runtest
ERROR: runtest.exp does not exist

I think two standard paths ('/usr/share/dejagnu' and '/usr/local/share/dejagnu' - which is where 'runtest.exp' is usually located) could be added to runtest script to be searched every-time. A little patch is attached.

Thanks for any comments

Cheers,

Honza

[1] https://fedoraproject.org/wiki/Features/UsrMove
[2] https://bugzilla.redhat.com/show_bug.cgi?id=788811
diff -up dejagnu-1.5/runtest.usrmove dejagnu-1.5/runtest
--- dejagnu-1.5/runtest.usrmove	2012-02-24 13:03:17.145409711 +0100
+++ dejagnu-1.5/runtest	2012-02-24 13:04:32.068473042 +0100
@@ -109,7 +109,7 @@ fi
 #
 # .. which is a very weak assumption
 
-for i in `echo ${execpath} | sed  -e 's@/[^/]*$@/share/dejagnu@'` `echo ${execpath} | sed  -e 's@/[^/]*/[^/]*$@/share/dejagnu@'` $execpath ; do
+for i in `echo ${execpath} | sed  -e 's@/[^/]*$@/share/dejagnu@'` `echo ${execpath} | sed  -e 's@/[^/]*/[^/]*$@/share/dejagnu@'` $execpath '/usr/share/dejagnu' '/usr/local/share/dejagnu' ; do
     if expr $verbose \> 1 > /dev/null ; then
 	echo Looking for $i/runtest.exp.
     fi
_______________________________________________
DejaGnu mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/dejagnu

Reply via email to