From 52f9b3e9e08eb34a82ec1f395294becbfcffb134 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 27 Jul 2014 13:49:10 +0200 Subject: [PATCH] autodist-upstream-updates: try to detect and remove unstable releases in parse_gnome() --- autodist-upstream-updates | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/autodist-upstream-updates b/autodist-upstream-updates index 33dc52d..67d9ebe 100755 --- a/autodist-upstream-updates +++ b/autodist-upstream-updates @@ -1,7 +1,7 @@ #!/bin/bash # # autodist upstream updates - find upstream packages updates from different internet resources -# Copyright (c) 2004-2013 by Silvan Calarco +# Copyright (c) 2004-2014 by Silvan Calarco # #[ -r /etc/sysconfig/openmamba-central ] || { @@ -231,7 +231,16 @@ parse_gnome() { ver="$3" alias=`grep "^$pkg " $ALIASES_DB` [ "$alias" ] || alias=`grep "^lib$pkg " $ALIASES_DB` - [ "$pkg" -a "$ver" ] && echo "$pkg $ver $SOURCEURL ${alias/* /}" >> $tmpfile + if [ "$pkg" -a "$ver" ]; then + ver1=$(echo $ver | cut -d. -f1) + ver2=$(echo $ver | cut -d. -f2) + if [ $ver1 -ge 2 -a $ver1 -le 4 -a "$ver2" -a $(($ver2 % 2)) -ne 0 ]; then + # skip unstable 2.x and 3.x versions with odd numbers + continue + else + echo "$pkg $ver $SOURCEURL ${alias/* /}" >> $tmpfile + fi + fi fi done done