Author Michael.Dussere
Recipients Michael.Dussere
Date 2014-08-05.13:28:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1407245312.64.0.904100539745.issue22140@psf.upfronthosting.co.za>
In-reply-to
Content
Our python is installed on a shared directory that is accessed through a symbolic link. 
$ which python3.4-config
/Produits/publics/x86_64.Linux.RH6/python/3.4.1/bin/python3.4-config

$ ls -al /Produits
lrwxrwxrwx 1 root root 13 Oct 31  2013 /Produits -> /nfs/Produits

With this configuration python-config returns a wrong path (it gives a double /nfs prefix)

$ python3.4-config --includes
-I/nfs/nfs/Produits/publics/x86_64.Linux.RH6/python/3.4.1/include/python3.4m -I/nfs/nfs/Produits/publics/x86_64.Linux.RH6/python/3.4.1/include/python3.4m


The problem is due to a double string replacement in the script

   prefix_build="/Produits/publics/x86_64.Linux.RH6/python/3.4.1"
   prefix_real=$(installed_prefix "$0")

   # Use sed to fix paths from their built-to locations to their installed-to
   # locations.
   prefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#")
   exec_prefix_build="${prefix}"
   exec_prefix=$(echo "$exec_prefix_build" | sed "s#$exec_prefix_build#$prefix_real#")
   includedir=$(echo "${prefix}/include" | sed "s#$prefix_build#$prefix_real#")

for $includedir the replacement of $prefix_build by $prefix_real is applyed twice and since the $prefix_real contains $prefix_build it produce a wrong result.

In addition I think it is strange to have lines like the following
prefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#")
History
Date User Action Args
2014-08-05 13:28:32Michael.Dusseresetrecipients: + Michael.Dussere
2014-08-05 13:28:32Michael.Dusseresetmessageid: <1407245312.64.0.904100539745.issue22140@psf.upfronthosting.co.za>
2014-08-05 13:28:32Michael.Dusserelinkissue22140 messages
2014-08-05 13:28:32Michael.Dusserecreate