Changeset 4430632


Ignore:
Timestamp:
12/14/13 06:17:48 (7 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
17c7c87
Parents:
88bee94
Message:

Cleanup how we do some pkgng conflict detection for the GUIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/libsh/functions.sh

    r009d9db r4430632  
    453453check_pkg_conflicts() 
    454454{ 
     455 
     456  if [ -z "$EVENT_PIPE" ] ; then unset EVENT_PIPE ; fi 
     457 
    455458  # Lets test if we have any conflicts 
    456   pkg-static ${1} 2>&1 | tee /tmp/.pkgConflicts.$$ 
    457   local _err=$? 
    458   if [ $_err -eq 0 ] ; then rm /tmp/.pkgConflicts.$$ ; return ; fi 
     459  pkg-static ${1} 2>/tmp/.pkgConflicts.$$ >/tmp/.pkgConflicts.$$ 
     460  if [ $? -eq 0 ] ; then rm /tmp/.pkgConflicts.$$ ; return ; fi 
    459461 
    460462  
     
    467469        > /tmp/.pkgConflicts.$$.2 
    468470 
    469   if [ -z `tail /tmp/.pkgConflicts.$$.2` ] ; then 
     471  # Check how many conflicts we found 
     472  found=`wc -l /tmp/.pkgConflicts.$$.2 | awk '{print $1}'` 
     473  if [ "$found" = "0" ] ; then 
    470474     rm /tmp/.pkgConflicts.$$ 
    471      return $_err 
     475     rm /tmp/.pkgConflicts.$$.2 
     476     return 0 
    472477  fi 
    473478 
Note: See TracChangeset for help on using the changeset viewer.