Question about startkde and path to Qt executables

Elvis Stansvik elvstone at gmail.com
Sat Mar 30 19:33:09 GMT 2013


Hi all,

Line 19-33 of the startkde script reads:

# in case we have been started with full pathname spec without being in PATH
bindir=`echo "$0" | sed -n 's,^\(/.*\)/[^/][^/]*$,\1,p'`
if [ -n "$bindir" ]; then
  qbindir=`$bindir/kde4-config --qt-binaries`
  if [ -n "$qbindir" ]; then
    case $PATH in
      $qbindir|$qbindir:*|*:$qbindir|*:$qbindir:*) ;;
      *) PATH=$qbindir:$PATH; export PATH;;
    esac
  fi
  case $PATH in
    $bindir|$bindir:*|*:$bindir|*:$bindir:*) ;;
    *) PATH=$bindir:$PATH; export PATH;;
  esac
fi


What's the reason for adding the path of the Qt executables to the
PATH? (the second "if" clause)


Does KDE need the Qt tools to be in PATH for some reason? I tried
commenting those lines and it started fine without them.


The reason I'm asking is I'm on Arch, which recently switched to a setup where:


/usr/bin/qmake is the Qt 5 version

/usr/bin/qmake-qt4 is a symlink to /usr/lib/qt4/bin/qmake


(same for the other tools)


So I was expecting "qmake" on the command line to give me the Qt 5
version, but was surprised that startkde had changed the PATH like
this.


I've later learned from Thiago that the Arch setup is out-of-policy,
and that if they want to support both Qt 4 and Qt 5 they should
install qtchooser.


But I'm still curious about the reason for requiring the Qt tools to
be in the PATH.


Cheers,

Elvis Stansvik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130330/b11cbd03/attachment.htm>


More information about the kde-core-devel mailing list