--- otherpkgs.ORIG	2013-03-15 14:29:38.194816817 -0400
+++ otherpkgs	2013-03-15 14:50:37.715798593 -0400
@@ -342,18 +342,26 @@
         #check if the file name starts with -- or -. 
         #If it is start with -,  then the rpm must be removed before installing other packages
         #If it is start with --, then the rpm will be removed after  installing other packages
-        string_type=0;  #nornmal rpm
-        pos=`expr index  $x -`
-        if [ $pos -eq 1 ]; then 
-	    x=`echo ${x#-}`
-	    pos=`expr index  $x -`
-	    if [ $pos -eq 1 ]; then
-	        x=`echo ${x#-}`
-	        string_type=1  #start with --
-	    else
-	        string_type=-1 #start with -
-	    fi
-        fi
+	# Also check if it starts with /, in which case it is a repo.
+	case "$x" in
+	    --*)
+		string_type=1
+		x=${x#--}
+		;;
+	    -*)
+		string_type=-1
+		x=${x#-}
+		;;
+	    /*)
+		string_type=0
+		;;
+	    http://*|https://*)
+		string_type=3
+		;;
+	    *)
+		string_type=2
+		;;
+	esac
 	    
         if [ $hasyum -eq 0 ] && [ $haszypper -eq 0 ] && [ $hasapt -eq 0 ]; then
 	    if [  $string_type -eq -1 ]; then
@@ -370,6 +378,10 @@
 	    repo_pkgs_preremove="$repo_pkgs_preremove $x"
         elif [  $string_type -eq 1 ]; then
 	    repo_pkgs_postremove="$repo_pkgs_postremove $x"
+	elif [  $string_type -eq 2 ]; then
+	    repo_pkgs="$repo_pkgs $x"
+	elif [  $string_type -eq 3 ]; then
+	    repo_pkgs="$plain_pkgs $x"
         else
 	    fn=`basename $x`
 	    path=`dirname $x`
