Changeset bdf4cac


Ignore:
Timestamp:
12/10/13 09:09:00 (13 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
d2087999
Parents:
48087a03
Message:

Improve pc-sysinstall for pkgng 1.2.x, when doing installations from
local media, we can avoid doing a "pkg install", since it does unnecessary
steps of copying the media from DVD -> DISK -> INSTALL. Instead we will
do a 'pkg rquery' to get the filename of the requested package, and
install it with 'pkg add' which will stream from the DVD/USB directly.

File:
1 edited

Legend:

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

    r8f5ab24 rbdf4cac  
    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.