From cdc6efce95fc3b2d46253ae59914103ab7d01b41 Mon Sep 17 00:00:00 2001 From: Kay Marquardt Date: Tue, 26 Dec 2017 20:36:39 +0100 Subject: [PATCH 1/2] base_verion() fix possible suffix in webnin version In update-from-repo.sh I add - MMDD.HHMM to version, this gives 2 warnings: Argument "1.871-1223.1116" isn't numeric in sprintf at /var/packages/webmin/target/webmin/webmin/webmin-lib.pl line 767. Argument "1.871-1223.1116" isn't numeric in numeric gt (>) at /var/packages/webmin/target/webmin/webmin/webmin-lib.pl line 1216. I added a small regex to filter out (possible) postfixes from version number, but does not change official version number: s/[-a-z:_].*//gi only done in one place in case you say don't care about, its working, even the warning is shown :-) --- webmin/webmin-lib.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webmin/webmin-lib.pl b/webmin/webmin-lib.pl index 42987a7c9..5494e6058 100755 --- a/webmin/webmin-lib.pl +++ b/webmin/webmin-lib.pl @@ -764,6 +764,8 @@ Rounds a version number down to the nearest .01 =cut sub base_version { +#remove waning about (possible) postfixes from update-from-repo.sh +$_[0] =~ s/[-a-z:_].*//gi; return sprintf("%.2f0", $_[0]); } From 6a5ce9e43d12896cbe8f56fe20070a9489e0298e Mon Sep 17 00:00:00 2001 From: Kay Marquardt Date: Tue, 26 Dec 2017 20:41:51 +0100 Subject: [PATCH 2/2] fix version postfix typo from . to - in update-from-repo.sh I add a postfix from latest commit date to version number so you know its not the offical version and whats the latest commit in. I wanted to use - as seperator but used . by accident. --- update-from-repo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-from-repo.sh b/update-from-repo.sh index e277478d0..ba27d7b2d 100755 --- a/update-from-repo.sh +++ b/update-from-repo.sh @@ -139,7 +139,7 @@ if [[ $EUID -eq 0 ]]; then #################### # start processing pulled source - version="`head -c -1 ${TEMP}/version`.`cd ${TEMP}; ${GIT} log -1 --format=%cd --date=format:'%m%d.%H%M'`" + version="`head -c -1 ${TEMP}/version`-`cd ${TEMP}; ${GIT} log -1 --format=%cd --date=format:'%m%d.%H%M'`" if [[ "${LANG}" != "YES" ]]; then ############### # FULL update