From ce35c6068c15be9244479400911815d29cd85a56 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 18 Jun 2012 11:43:36 -0400 Subject: Don't fall back to fetching PBIs from FreeBSD, they have none. --- etc/inc/pkg-utils.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'etc/inc/pkg-utils.inc') diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index e9fcf01..cf06694 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -518,12 +518,11 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url = $fetchdir = $g['tmp_path']; } - $osname = php_uname("s"); - $arch = php_uname("m"); - $rel = strtolower(php_uname("r")); - if (substr_count($rel, '-') > 1) - $rel = substr($rel, 0, strrpos($rel, "-")); - $priv_url = "http://ftp2.{$osname}.org/pub/{$osname}/ports/{$arch}/packages-{$rel}/All"; + /* FreeBSD has no PBI's hosted, so fall back to our own URL for now. (Maybe fail to PC-BSD?) */ + $arch = php_uname("m"); + $arch = ($arch == "i386") ? "" : $arch . '/'; + $rel = get_freebsd_version(); + $priv_url = "http://files.pfsense.org/packages/{$arch}{$rel}/All/"; if (empty($base_url)) $base_url = $priv_url; if (substr($base_url, -1) == "/") @@ -1299,3 +1298,4 @@ function stop_packages() { } ?> + \ No newline at end of file -- cgit v1.1