Permalink
Browse files

Don't trust the return value of pkg upgrade -FUy, check output data

for any package conflicts and do conflict resolution if found
  • Loading branch information...
kmoore134 committed Feb 14, 2014
1 parent 58035e0 commit 953cbc3d9a40bc68cf4a54982d9b43c9b7f31222
Showing with 3 additions and 1 deletion.
  1. +3 −1 src-sh/libsh/functions.sh
@@ -457,7 +457,9 @@ check_pkg_conflicts()
# Lets test if we have any conflicts
pkg-static ${1} | tee /tmp/.pkgConflicts.$$
- if [ $? -eq 0 ] ; then rm /tmp/.pkgConflicts.$$ ; return ; fi
+
+ cat /tmp/.pkgConflicts.$$ | grep -q "WARNING: locally installed"
+ if [ $? -ne 0 ] ; then rm /tmp/.pkgConflicts.$$ ; return ; fi
# Found conflicts, suprise suprise, yet another reason I hate packages

0 comments on commit 953cbc3

Please sign in to comment.