Changeset 5a917f1


Ignore:
Timestamp:
03/08/14 12:30:44 (7 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
f758657, 84091d6
Parents:
e01392dc
Message:

Workaround for yet another crazy conflict bug with pkgng...

This time if the package it *reports* as conflicting isn't really the
package name, we have to test each of the names reported, just in case
the ports tree decided to move / rename the origin / package on us...

<Sigh>

File:
1 edited

Legend:

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

    re01392dc r5a917f1  
    471471  cat /tmp/.pkgConflicts.$$ | grep "Conflict found on path" | cut -d ')' -f 2 | cut -d '(' -f 1 | awk '{print $2}' >> /tmp/.pkgConflicts.$$.2 
    472472 
     473  # OMFG this is super-lame, not only do we have to grab different style conflicts 
     474  # but we may even have the *wrong* package name reported if it changed in the  
     475  # repo... I.E. py27-requests1-1.2.3 != py27-requests-1.2.3 
     476  # As a VERY crude work-around, grab the other origin names, see which one matches 
     477  cat /tmp/.pkgConflicts.$$ | grep "Conflict found on path" | cut -d '(' -f 2 | cut -d ')' -f 1 >> /tmp/.pkgConflicts.$$.2 
     478  cat /tmp/.pkgConflicts.$$ | grep "Conflict found on path" | cut -d '(' -f 3 | cut -d ")" -f 1 >> /tmp/.pkgConflicts.$$.2 
     479 
    473480  # Get a sorted unique list 
    474481  cat /tmp/.pkgConflicts.$$.2 | sort | uniq > /tmp/.pkgConflicts.$$.3 
     
    483490  fi 
    484491 
     492  # Done with EVENT_PIPE at this point 
     493  if [ -n "$EVENT_PIPE" ] ; then unset EVENT_PIPE; fi 
     494 
     495 
    485496  while read line 
    486497  do 
    487     cList="$line $cList" 
     498    # Because PKGNG sucks, we have to now double-check again if these conflicts *really* 
     499    # are installed <facepalm> 
     500    pkg-static info -e $line 
     501    if [ $? -eq 0 ] ; then 
     502      cList="$line $cList" 
     503    fi 
    488504  done < /tmp/.pkgConflicts.$$.3 
    489505  rm /tmp/.pkgConflicts.$$.3 
     
    523539     echo "Removing conflicting package: $bPkg" 
    524540 
    525      # If EVENT_PIPE is set, unset it, seems to cause some weird crash in pkgng 1.2.3 
    526      if [ -n "$EVENT_PIPE" ] ; then 
    527         unset EVENT_PIPE 
    528      fi 
    529  
    530541     # Delete the package now 
    531542     pkg delete -q -y -f ${bPkg} 
Note: See TracChangeset for help on using the changeset viewer.