Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.3
-
None
-
Linux and Solaris with GNU stow.
Description
On the system I'm working on, Qt (and everything else) is installed using GNU stow: simplifying a bit, Qt is configured to run from /prefix, DESTDIR is set so it actually installs into /prefix/packages/qt, and stow creates symlinks from /prefix/whatever to /prefix/packages/qt/whatever.
This works fine except that qmake expects to be able to read the "default" spec symlink, then take the basename of the target to work out which spec it's actually using. When Qt is stowed, the "default" that it reads is actually a symlink to the real "default" in the package directory; it needs to chase the symlink again to find the real spec.
The attached match makes it follow symlinks until it finds a real file. I'm not sure why the current code in qmake uses readlink rather than QFileInfo::symLinkTarget; the patch makes it use the latter, which simplifies the code a bit too.