Changeset f967699


Ignore:
Timestamp:
Jul 18, 2013 9:55:28 AM (9 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
b521926
Parents:
dc77b5c
Message:

Fix up some bugs performing updates to another base system, such as
9-STABLE

  • Don't download pkgs twice
  • Only download cache packages from the pkgng repo listed in pkg.conf
  • Grab the pkg.txz file from the correct CDN mirror
Location:
src-sh
Files:
2 edited

Legend:

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

    r7f1df64 rf967699  
    4444  export PKG_CACHEDIR 
    4545 
     46  # Where are the packages on our mirrors? 
     47  cat /usr/local/etc/pkg.conf | grep -q "^packagesite:" 
     48  if [ $? -ne 0 ] ; then 
     49     exit_err "Failed getting packagesite:" 
     50  fi 
     51  pkgUrl="`grep '^packagesite:' /usr/local/etc/pkg.conf | awk '{print $2}'`" 
     52 
    4653  PKGREL=`uname -r | cut -d '-' -f 1-2` 
    4754 
    48   # Where are the packages on our mirrors? 
    49   pkgUrl="/${PKGREL}/${ARCH}" 
    5055 
    5156  if [ ! -d "$PKG_CACHEDIR/All" ] ; then 
     
    6671        rm ${PKG_CACHEDIR}/All/${i} ;  
    6772    fi 
    68     get_file_from_mirrors "${pkgUrl}/All/${i}" "${PKG_CACHEDIR}/All/${i}" "pkg" 
     73    get_file "${pkgUrl}/All/${i}" "${PKG_CACHEDIR}/All/${i}" 
    6974    if [ $? -ne 0 ] ; then 
    70       echo "Failed downloading: /${pkgUrl}/All/${i}" 
     75      echo "Failed downloading: ${pkgUrl}/All/${i}" 
    7176      return 1 
    7277    fi 
     
    281286                rm "/tmp/.fetch-size.$$" 2>/dev/null 
    282287                _time=1 
     288                if [ -z "$_fSize" ] ; then _fSize=0; fi 
    283289 
    284290                ( fetch -r -o "${_lf}" "${_rf}" >/dev/null 2>/dev/null ; echo "$?" > ${_eFile} ) & 
     
    631637 
    632638  # Start first-boot wizard 
    633   /usr/local/bin/pc-firstboot 
     639  /usr/local/bin/pc-firstboot >/var/log/pc-firstbootwiz 2>/var/log/pc-firstbootwiz 
    634640  if [ $? -eq 0 ] ; then 
    635641    rm /var/.pcbsd-firstgui 
  • src-sh/pc-updatemanager/pc-updatemanager

    r5a47ba4 rf967699  
    455455  # Lets download the new pkgng for this release 
    456456  if [ -e "/usr/local/tmp/pkg.txz" ] ; then rm /usr/local/tmp/pkg.txz; fi 
    457   pc-pkg getfile -o /usr/local/tmp/pkg.txz /packages/$rel/$arch/Latest/pkg.txz 
     457  get_file_from_mirrors "/packages/$rel/$arch/Latest/pkg.txz" "/usr/local/tmp/pkg.txz" "pkg" 
    458458  if [ $? -ne 0 ] ; then 
    459459     rollback_update 
     
    488488 
    489489  # Now its time to force a pkg-update of all packages to their new FreeBSD compiled versions 
     490  SKIP_CACHE_PKGS="YES" ; export SKIP_CACHE_PKGS 
    490491  pc-updatemanager pkgupdate -f 
    491492 
     
    556557  fi 
    557558 
    558   # Lets pre-download all the packages 
    559   download_cache_packages "pkg-static upgrade -U -n $1" 
     559  # If we aren't instructed to skip the package cache process 
     560  if [ -z "$SKIP_CACHE_PKGS" ] ; then 
     561    # Lets pre-download all the packages 
     562    download_cache_packages "pkg-static upgrade -U -n $1" 
     563  fi 
    560564 
    561565  check_pkg_conflicts "upgrade -U -F -y $1" 
Note: See TracChangeset for help on using the changeset viewer.