From 4c002bd1d6d8c2118cb27b3246e08a80a8a8107f Mon Sep 17 00:00:00 2001 From: Yurii Prokulevych Date: Tue, 19 Dec 2017 10:10:57 +0200 Subject: [PATCH] Check for yum lock befor all yum* operations. A previous (failed/hanging?) yum process blocks 'yum makecache' and 'yum check-update' operations, which leads to timeout during minor update. Change-Id: I461c1c722944813493f53f339054f420d6ddbe15 Related-Bug: #1704131 (cherry picked from commit bfe876e01c9b29f8eaf72579614b4e52d4d795b5) (cherry picked from commit 2ae1f02e4e0d80f813e74db40ed12d7ea7cf11f6) --- extraconfig/tasks/yum_update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh index 8d96b16e74..db86a65c04 100755 --- a/extraconfig/tasks/yum_update.sh +++ b/extraconfig/tasks/yum_update.sh @@ -65,9 +65,11 @@ fi command_arguments=${command_arguments:-} # Always ensure yum has full cache +check_for_yum_lock yum makecache || echo "Yum makecache failed. This can cause failure later on." # yum check-update exits 100 if updates are available +check_for_yum_lock set +e check_update=$(yum check-update 2>&1) check_update_exit=$?