Bug 77669

Summary: Extraneous message in admin/Makefile.common using --prefix
Product: [Developer tools] configure Reporter: Rob Kaper <webmaster>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: VLO    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: FreeBSD   
Latest Commit: Version Fixed In:
Attachments: patch

Description Rob Kaper 2004-03-15 13:28:00 UTC
Version:           unknown (using KDE 3.2.1, compiled sources)
Compiler:          gcc version 3.3.3 [FreeBSD] 20031106
OS:          FreeBSD (i386) release 5.2-RELEASE

When using --prefix, I got the following message from admin/Makefile.common:

Warning: you chose to install this package in /home/cap/install,
but KDE was found in /usr/local.
For this to work, you will need to tell KDE about the new prefix, by ensuring
that KDEDIRS contains it, e.g. export KDEDIRS=/home/cap/install:/usr/local
Then restart KDE.

Kind of extraneous, because the prefixed path *is* in KDEDIRS for me. Would be nice to omit this message when the prefix path is already there, to avoid confusion.
Comment 1 Stephan Kulow 2004-03-15 13:42:19 UTC
I think, reminding the user of the importance is still ok
Comment 2 David Faure 2004-03-15 17:46:31 UTC
Created attachment 5228 [details]
patch

This should do it. Can you test it?
Comment 3 Rob Kaper 2004-03-15 18:15:42 UTC
Doesn't work, because you prefixed and postfixed the grep with ":", so this would only work if there are other dirs before *and* behind the prefix in KDEDIRS.
Comment 4 David Faure 2004-03-15 19:25:31 UTC
> Doesn't work, because you prefixed and postfixed the grep with ":", so this would only work if there are other dirs before *and* behind the prefix in KDEDIRS.

No, I also prefixed and postfixed the output of kde-config with ":"....

Comment 5 Rob Kaper 2004-03-15 20:01:01 UTC
Ah. Hm, I used $HOME/install which expands to /home/cap/install while I put
/usr/home/cap/install in KDEDIRS.

Works fine now. :-)

Comment 6 David Faure 2004-03-15 20:10:52 UTC
CVS commit by faure: 

Don't warn about using a different prefix than kde(libs)'s prefix,
if kde already knows about the prefix (e.g. via KDEDIRS).
CCMAIL: 77669-done@bugs.kde.org


  M +11 -7     configure.in.bot.end   1.4


--- kde-common/admin/configure.in.bot.end  #1.3:1.4
@@ -3,11 +3,15 @@
   # And if so, warn when they don't match
   if test "$kde_libs_prefix" != "$given_prefix"; then
-    echo ""
-    echo "Warning: you chose to install this package in $given_prefix,"
-    echo "but KDE was found in $kde_libs_prefix."
-    echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
-    echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
-    echo "Then restart KDE."
-    echo ""
+    # And if kde doesn't know about the prefix yet
+    echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
+    if test $? -ne 0; then
+      echo ""
+      echo "Warning: you chose to install this package in $given_prefix,"
+      echo "but KDE was found in $kde_libs_prefix."
+      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
+      echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
+      echo "Then restart KDE."
+      echo ""
+    fi
   fi
 fi