Commit ce3d23e4 authored by Vitaly Lipatov's avatar Vitaly Lipatov

repl: fix replacement list order

parent 3da62cf5
......@@ -80,6 +80,8 @@ print_grpreq()
eval_spec ${1} | grep "^Group" | sed -e "s|^.*:||g" | sort -u | filter_strip_spaces
}
# FIXME: need improvement
# use tests/test_repl_find.sh for test it
# PKGVENDOR, PKGFORMAT, DISTRVERSION is already defined in detect_target_env() func
internal_repl_list()
{
......@@ -91,7 +93,7 @@ internal_repl_list()
# Hack for sort by last numbers: sort -n -t . -k 3
( ls -1 $PKGREPLBASE/pkgrepl.$PKGVENDOR*$ARCHEXT 2>/dev/null | \
( test -n "$ARCHEXT" && grep -v "$PKGVENDOR$ARCHEXT\$" || grep -v "x86_64" ) ; echo $FINDPKG ) | \
sort -u | sort -n -t . -k 3 | grep "^$FINDPKG\$" -B1000 | sort -r
sort -u | sort -n -t . -k 3 | grep "^$FINDPKG\$" -B1000 | sort -r -n -t . -k 3
echo $REPLBASE.$PKGVENDOR$ARCHEXT
[ "$PKGVENDOR" = "alt" ] || echo "$REPLBASE.$PKGFORMAT$ARCHEXT "
}
......@@ -101,11 +103,11 @@ print_replbased_list()
{
local REPLBASE="$1"
if [ "$BUILDARCH" = "x86_64" ] ; then
internal_repl_list $REPLBASE .x86_64
internal_repl_list $REPLBASE .x86_64 | uniq
fi
# general rules listing
internal_repl_list $REPLBASE ""
internal_repl_list $REPLBASE "" | uniq
}
# TODO: list in alph. order and use if <= then our version
......
......@@ -31,8 +31,8 @@ for i in `print_grprepl_list` ; do
done
}
VENDOR=fedora
TARGET=rpm
PKGVENDOR=fedora
PKGFORMAT=rpm
DISTRVERSION=10
echo "PkgRepl:"
......@@ -49,24 +49,31 @@ check_repl()
check $1 "`print_replace $1`" $2
}
echo "Correct replacement checking for $VENDOR/$DISTRVERSION (target $TARGET):"
echo "Correct replacement checking for $PKGVENDOR/$DISTRVERSION (target $PKGFORMAT):"
check_repl rpm-build-compat rpm-build-altlinux-compat
check_repl libusb-devel libusb-devel
VENDOR=ubuntu
TARGET=deb
DISTRVERSION=9.04
PKGVENDOR=ubuntu
PKGFORMAT=deb
DISTRVERSION=11.04
echo "Correct replacement checking for $PKGVENDOR/$DISTRVERSION (target $PKGFORMAT):"
print_pkgrepl_list
echo "Correct replacement checking for $VENDOR/$DISTRVERSION (target $TARGET):"
check_repl rpm-build-compat rpm-build-altlinux-compat
check_repl libusb-devel libusb-dev
VENDOR=mdv
PKGVENDOR=mdv
DISTRVERSION=2010.1
DEFAULTARCH=x86_64
TARGET=rpm
BUILDARCH=x86_64
PKGFORMAT=rpm
#FINDPKG=$PKGREPLBASE.pkgrepl.$VENDOR.$DISTRVERSION
#( ls -1 $PKGREPLBASE/pkgrepl.$VENDOR* | grep -v x86_64 ; echo $FINDPKG ) | sort -u | grep "^$FINDPKG\$" -B1000 | sort -r
echo
echo "Correct replacement checking for $PKGVENDOR/$DISTRVERSION (target $PKGFORMAT):"
print_pkgrepl_list
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment