[PC-BSD Commits] r21936 - pcbsd/current/src-sh/libsh

svn at pcbsd.org svn at pcbsd.org
Wed Mar 20 17:11:20 PDT 2013


Author: kris
Date: 2013-03-21 00:11:20 +0000 (Thu, 21 Mar 2013)
New Revision: 21936

Modified:
   pcbsd/current/src-sh/libsh/functions.sh
Log:

Fix a bug fetching packages from mirrors with pc-pkg and pc-metapkgmanger



Modified: pcbsd/current/src-sh/libsh/functions.sh
===================================================================
--- pcbsd/current/src-sh/libsh/functions.sh	2013-03-20 21:21:52 UTC (rev 21935)
+++ pcbsd/current/src-sh/libsh/functions.sh	2013-03-21 00:11:20 UTC (rev 21936)
@@ -15,6 +15,7 @@
 
   # Tickle pkg update first
   pkg-static update
+  local ARCH="`uname -m`"
 
   ${1} > /tmp/.pkgUpList.$$
 
@@ -42,10 +43,8 @@
   fi
   export PKG_CACHEDIR
 
-  cat /usr/local/etc/pkg.conf | grep -q "^packagesite:"
-  if [ $? -eq 0 ] ; then
-    pkgUrl="`grep '^packagesite:' /usr/local/etc/pkg.conf | awk '{print $2}' | cut -d '/' -f 4-`"
-  fi
+  # Where are the packages on our mirrors?
+  pkgUrl="/packages/`uname -r`/${ARCH}"
 
   if [ ! -d "$PKG_CACHEDIR/All" ] ; then
      mkdir -p ${PKG_CACHEDIR}/All
@@ -54,7 +53,7 @@
   for i in $pkgList
   do
     if [ -e "${PKG_CACHEDIR}/All/${i}" ] ; then rm ${PKG_CACHEDIR}/All/${i} ; fi
-    get_file_from_mirrors "/${pkgUrl}/All/${i}" "${PKG_CACHEDIR}/All/${i}"
+    get_file_from_mirrors "${pkgUrl}/All/${i}" "${PKG_CACHEDIR}/All/${i}"
     if [ $? -ne 0 ] ; then
       exit_err "Failed downloading: /${pkgUrl}/All/${i}"
     fi



More information about the Commits mailing list