Merge remote-tracking branch 'origin/5.9' into 5.10

Change-Id: I71b7fd09cd8f1c7e64531eec8a645c06a7066325
This commit is contained in:
Liang Qi 2018-02-07 13:58:54 +01:00
commit 6cd75cce72
6 changed files with 18 additions and 6 deletions

View File

@ -88,7 +88,7 @@ try
fi
echo "Running SDK manager for platforms;$sdkApiLevel, tools, platform-tools and build-tools;$sdkBuildToolsVersion."
if [ "$proxy" != "" ]; then
if [ "$http_proxy" != "" ]; then
proxy_host=$(echo $proxy | cut -d'/' -f3 | cut -d':' -f1)
proxy_port=$(echo $proxy | cut -d':' -f3)
echo "y" |"$sdkTargetFolder/tools/bin/sdkmanager" --no_https --proxy=http --proxy_host=$proxy_host --proxy_port=$proxy_port "platforms;$sdkApiLevel" "tools" "platform-tools" "build-tools;$sdkBuildToolsVersion" || throw $ExceptionSdkManager

View File

@ -37,7 +37,6 @@
# CMake is needed for autotests that verify that Qt can be built with CMake
# shellcheck source=InstallFromCompressedFileFromURL.sh
source "${BASH_SOURCE%/*}/../unix/InstallFromCompressedFileFromURL.sh"
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"

View File

@ -37,6 +37,6 @@ set -ex
source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh"
if [ "$proxy" != "" ]; then
if [ "$http_proxy" != "" ]; then
echo "proxy=$proxy" | sudo tee -a /etc/yum.conf
fi

View File

@ -51,6 +51,6 @@ gsettings set org.gnome.desktop.screensaver lock-enabled false
# disable blank screen power saving
gsettings set org.gnome.desktop.session idle-delay 0
if [ "$proxy" != "" ]; then
if [ "$http_proxy" != "" ]; then
echo "proxy=$proxy" | sudo tee -a /etc/yum.conf
fi

View File

@ -47,6 +47,7 @@ ExceptionGsettings2=101
ExceptionGsettings3=102
ExceptionNTS=103
ExceptionProxy=104
ExceptionGrub=105
try
(
@ -58,11 +59,14 @@ try
gsettings set org.gnome.desktop.screensaver lock-enabled false || throw $ExceptionGsettings2
echo "Disable questions on shutdown."
gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown true || throw $ExceptionGsettings3
echo "Set grub timeout to 0"
sudo sed -i 's|GRUB_TIMEOUT=10|GRUB_TIMEOUT=0|g' /etc/default/grub || throw $ExceptionGrub
sudo update-grub || throw $ExceptionGrub
echo "Set Network Test Server address to $NTS_IP in /etc/hosts"
echo "$NTS_IP qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts || throw $ExceptionNTS
if [ "$proxy" != "" ]; then
if [ "$http_proxy" != "" ]; then
echo "Acquire::http::Proxy \"$proxy\";" | sudo tee -a /etc/apt/apt.conf || throw $ExceptionProxy
fi
)
@ -84,6 +88,10 @@ catch || {
echo "Failed to disable questions on shutdown."
exit 1;
;;
$ExceptionGrub)
echo "Failed to set grub timeout."
exit 1;
;;
$ExceptionNTS)
echo "Failed to set network teset server address into /etc/hosts."
exit 1;

View File

@ -7,13 +7,18 @@ source $BASEDIR/../common/shared/network_test_server_ip.txt
source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh"
sed -i '$ a\[Daemon\]\nAutolock=false\nLockOnResume=false' ~/.config/kscreenlockerrc
echo "Set grub timeout to 0"
sudo sed -i 's|GRUB_TIMEOUT=10|GRUB_TIMEOUT=0|g' /etc/default/grub
sudo update-grub
echo "Set Network Test Server address to $network_test_server_ip in /etc/hosts"
echo "$network_test_server_ip qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts
echo "Set DISPLAY"
echo 'export DISPLAY=":0"' >> ~/.bashrc
echo "Disabling file indexing."
sudo balooctl disable
if [ "$proxy" != "" ]; then
if [ "$http_proxy" != "" ]; then
sudo sed -i 's/PROXY_ENABLED=\"no\"/PROXY_ENABLED=\"yes\"/' /etc/sysconfig/proxy
sudo sed -i "s|HTTP_PROXY=\".*\"|HTTP_PROXY=\"$proxy\"|" /etc/sysconfig/proxy
fi