Don't trigger mariadb upgrade dump/restore when not needed
When upgrading from mariadb X.Y.Z to mariadb X.Y.Ž (X.Y part stays the
same), the dump/restore of mariadb shouldn't be necessary. Therefore we
now only check for up to the first 2 fields of the version string when
determining if we should trigger the dump/restore operation.
Closes-Bug: #1615721
Change-Id: Ib7af8bfb121f5c83184d51b3c6dc657108c25973
(cherry picked from commit 072404b569
)
This commit is contained in:
parent
6919263857
commit
690b94e2b6
|
@ -113,11 +113,11 @@ function is_mysql_upgrade_needed {
|
|||
fi
|
||||
|
||||
local currentepoch=$(rpm -q --qf "%{epoch}" $name)
|
||||
local currentversion=$(rpm -q --qf "%{version}" $name)
|
||||
local currentversion=$(rpm -q --qf "%{version}" $name | cut -d. -f-2)
|
||||
local currentrelease=$(rpm -q --qf "%{release}" $name)
|
||||
local newoutput=$(repoquery -a --pkgnarrow=updates --qf "%{epoch} %{version} %{release}\n" $name)
|
||||
local newepoch=$(echo "$newoutput" | awk '{ print $1 }')
|
||||
local newversion=$(echo "$newoutput" | awk '{ print $2 }')
|
||||
local newversion=$(echo "$newoutput" | awk '{ print $2 }' | cut -d. -f-2)
|
||||
local newrelease=$(echo "$newoutput" | awk '{ print $3 }')
|
||||
|
||||
# With this we trigger the dump restore/path if we change either epoch or
|
||||
|
|
Loading…
Reference in New Issue