Changeset 68c5dd4


Ignore:
Timestamp:
12/10/13 09:11:54 (13 months ago)
Author:
Kris Moore <kris@…>
Branches:
9.2-release
Children:
c8fc43e5
Parents:
b01ad3f
Message:

Backport the pkgng / pc-sysinstall improvements for 9.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-sysinstall/backend/functions-installpackages.sh

    r3d32d18 r68c5dd4  
    6262  bootstrap_pkgng 
    6363 
     64  # Update the repo database 
     65  echo "Updating pkgng database" 
     66  case "${INSTALLMEDIUM}" in 
     67    usb|dvd|local) run_chroot_cmd "pkg -R /mnt/repo-installer update -f" ;; 
     68                *) run_chroot_cmd "pkg update -f" ;; 
     69  esac 
     70 
    6471  # Lets start by cleaning up the string and getting it ready to parse 
    6572  get_value_from_cfg_with_spaces installPackages 
     
    7279    # When doing a pkg install, if on local media, use a pkg.conf from /dist/ 
    7380    if [ "${INSTALLMEDIUM}" != "ftp" ] ; then 
    74       PKGADD="pkg -R /mnt/repo-installer install -y ${PKGNAME}" 
     81      # Get the package file-name 
     82      PKGFILENAME="" 
     83      PKGFILENAME=`chroot ${FSMNT} pkg -R /mnt/repo-installer rquery '%n-%v' ${PKGNAME}` 
     84      if [ -z "$PKGFILENAME" ] ; then 
     85         echo_log "Warning: No such package in repo: ${PKGNAME}" 
     86         sleep 2 
     87         continue 
     88      fi 
     89      if [ ! -e "${FSMNT}/mnt/All/${PKGFILENAME}.txz" ] ; then 
     90         echo_log "Warning: No such package file in repo: ${PKGFILENAME}" 
     91         sleep 2 
     92         continue 
     93      fi 
     94      PKGADD="pkg add /mnt/All/${PKGFILENAME}.txz" 
    7595    else 
    7696      # Doing a network install, use the default pkg.conf 
Note: See TracChangeset for help on using the changeset viewer.