Changeset a3b102b


Ignore:
Timestamp:
May 9, 2013 12:11:04 PM (14 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
2bba3b7
Parents:
5e00148
Message:

Improve how we run major updates, try to download as many PKGNG packages beforehand
as possible, so that if it fails, it does so before we get to the freebsd-update portion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-updatemanager/pc-updatemanager

    r21bd9d7 ra3b102b  
    363363  local rel=`echo $1 | sed 's|fbsd-||g'` 
    364364 
    365   # Download update files from freebsd-update 
    366   freebsd-update --non-interactive -r "$rel" upgrade 
    367   if [ $? -ne 0 ] ; then 
    368      exit_err "Failed running \"freebsd-update -r $rel upgrade\"..." 
    369   fi 
    370  
    371   # Now install files 
    372   freebsd-update --non-interactive install 
    373   if [ $? -ne 0 ] ; then 
    374      exit_err "Failed running \"freebsd-update install\"..." 
    375   fi 
    376  
    377   # Now re-extract overlay files to ensure we do file fixing / massaging  
    378   if [ "$SYSTYPE" = "PCBSD" ]; then  
    379     pc-extractoverlay desktop 
    380   fi 
    381   if [ "$SYSTYPE" = "TRUEOS" ]; then  
    382     pc-extractoverlay server 
    383   fi 
     365  # Lets backup the old pkg.conf file 
     366  cp /usr/local/etc/pkg.conf /usr/local/etc/pkg.conf.preUpgrade 
    384367 
    385368  # Set the new pkg.conf file to the new repo 
     
    388371  echo "PUBKEY: /usr/local/etc/pkg-pubkey.cert" >>/usr/local/etc/pkg.conf 
    389372  echo "PKG_CACHEDIR: /usr/local/tmp" >>/usr/local/etc/pkg.conf 
     373 
     374  # Lets pre-download all packages 
     375  download_cache_packages "pkg upgrade -f" 
     376 
     377  # Download update files from freebsd-update 
     378  freebsd-update --non-interactive -r "$rel" upgrade 
     379  if [ $? -ne 0 ] ; then 
     380     cp /usr/local/etc/pkg.conf.preUpgrade /usr/local/etc/pkg.conf 
     381     exit_err "Failed running \"freebsd-update -r $rel upgrade\"..." 
     382  fi 
     383 
     384  # Now install freebsd-update files 
     385  freebsd-update --non-interactive install 
     386  if [ $? -ne 0 ] ; then 
     387     cp /usr/local/etc/pkg.conf.preUpgrade /usr/local/etc/pkg.conf 
     388     exit_err "Failed running \"freebsd-update install\"..." 
     389  fi 
    390390 
    391391  # Now its time to force a pkg-update of all packages to their new FreeBSD compiled versions 
Note: See TracChangeset for help on using the changeset viewer.