Go to file
Caroline Chao 6c20a01cb9 QSysInfo: Expand Linux distribution detection
Expand Linux distribution detection to /etc/redhat-release and
/etc/debian_version to follow what /usr/bin/lsb_release script does.
If /usr/bin/lsb_release fails to extract the distribution information
from /etc/lsb-release, it then checks /etc/redhat-release and, as a last
fallback, /etc/debian_version.

Some Red Hat distributions have a /etc/lsb-release file that
does not provide the values we are looking for (DISTRIB_ID,
DISTRIB_RELEASE and DISTRIB_DESCRIPTION).

If both productType or productVersion are empty after reading
/etc/lsb-release, readEtcLsbRelease() will return false, allowing
further parsing of /etc/redhat-release. This scenario mimics what
the /usr/bin/lsb_release script does if /etc/lsb-release does not
contains enough information.

The productType and productVersion returned by QSysInfo after reading
/etc/redhat-release match the distributor id and release information
returned by the /usr/bin/lsb_release script.

For Debian Linux distributions where /etc/os-release, /etc/lsb-release
and /etc/redhat-release are not available nor usable, the
/usr/bin/lsb_release script also checks for the /etc/debian_version
file.

In this case, we also enable parsing of /etc/debian_version to retrieve a
fallback productVersion, the productType being set to Debian.

Change-Id: Ia20d513d78be8a8ee8c0410d0aaa052fde81a41d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-13 11:21:19 +00:00
bin fixqt4headers.pl: Improve detection of Qt 5 location. 2015-04-22 10:23:41 +00:00
config.tests Config: Suppress compiler warnings for floatmath 2015-04-13 05:51:39 +00:00
dist Add the changelog for 5.4.2 2015-04-29 17:36:56 +00:00
doc Merge remote-tracking branch 'origin/5.4' into 5.5 2015-04-15 09:09:24 +02:00
examples Make the windowcontainer example more robust 2015-05-12 08:58:47 +00:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Build Qt for OS X and iOS with relative rpath. 2015-05-13 04:09:47 +00:00
qmake fix wrong path separators in extra compiler commands 2015-05-08 15:35:12 +00:00
src QSysInfo: Expand Linux distribution detection 2015-05-13 11:21:19 +00:00
tests Tests: Remove tst_QHostInfo::abortHostLookupInDifferentThread() test 2015-05-13 11:21:14 +00:00
tools remove $INCLUDE/$LIB hack for mingw 2015-05-12 09:10:18 +00:00
util Fix typo when resolving EGL extension. 2015-04-23 11:54:36 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Remove qtdemo from gitignore 2014-09-17 12:38:55 +02:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Build qtconnectivity for iOS. 2015-05-13 06:36:44 +00:00
configure.bat support spaces in build and install dirs 2015-02-17 18:28:00 +00:00
header.BSD Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
header.FDL Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.LGPLv3 Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.LGPLv21 Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.PREVIEW.COMMERCIAL Update copyright headers 2015-02-11 06:49:51 +00:00
qtbase.pro fix distclean targets 2015-04-23 19:16:57 +00:00
sync.profile ANGLE: upgrade to 2.1~07d49ef5350a 2014-08-05 16:43:22 +02:00