slackpkg reinstall allow to choice the repository, as in install/upgrade mode.

Just useful when two repositories have identical packages (e.g. vlc on restricted and alienbob repository)
This commit is contained in:
Matteo Rossini 2016-02-05 22:49:37 +01:00
parent 1b8fcac079
commit 5db0cf44c4

View file

@ -748,7 +748,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
fi
fi
if [[ "$CMD" == "reinstall" ]];then
PKGINFOS=$( grep " $ARGUMENT " $TMPDIR/tmplist|awk '{print " "$6" "}'|grep -f - -n -m 1 ${TMPDIR}/pkglist)
PKGINFOS=$( grep " $ARGUMENT " $TMPDIR/tmplist|awk '{print " "$6" "}'|grep -f - -n ${TMPDIR}/pkglist|grep -f ${TMPDIR}/priority.filters -E -m 1 )
fi
if [ "$AUTOP" == "on" ] ; then
PKGINFOS=$(
@ -1494,7 +1494,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
# You can specify 'slackpkg install reponame:packagename'
elif echo "$pref" | grep -q "^[-_[:alnum:]]\+[:][a-zA-Z0-9]\+" ; then
if [ "$CMD" == "install" ] || [ "$CMD" == "upgrade" ] ; then
if [ "$CMD" == "install" ] || [ "$CMD" == "upgrade" ] || [ "$CMD" == "reinstall" ] ; then
repository=$(echo "$pref" | cut -f1 -d":")
package=$(echo "$pref" | cut -f2- -d":")