Improve one more time the regexp to match installed vs required versions.

--HG--
extra : convert_revision : 4ae4f3c2c565dc81a9dc6101444aa8f592aaac79
This commit is contained in:
Juan RP 2008-10-11 05:28:52 +02:00
parent 8ad6467b0f
commit e0f1962789

View file

@ -1049,7 +1049,7 @@ check_installed_tmpl()
run_file $PKGFS_TEMPLATESDIR/${pkg%-[0-9]*.*}.tmpl
reqver="$(echo $reqver | $sed_cmd 's|\.||g;s|[aA-zZ]||g')"
reqver="$(echo $reqver | $sed_cmd 's|[[:punct:]]||g;s|[[:alpha:]]||g')"
$db_cmd -K btree $PKGFS_REGPKG_DB $pkgname 2>&1 >/dev/null
if [ "$?" -eq 0 ]; then
@ -1064,7 +1064,7 @@ check_installed_tmpl()
# It's not optimal and may fail, but it is enough
# for now.
#
iver="$(echo $iver | $sed_cmd 's|\.||g;s|[aA-zZ]||g')"
iver="$(echo $iver | $sed_cmd 's|[[:punct:]]||g;s|[[:alpha:]]||g')"
if [ "$iver" -eq "$reqver" \
-o "$iver" -gt "$reqver" ]; then
return 0