summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-12-02 18:08:41 +0000
committerErmal <eri@pfsense.org>2010-12-02 18:09:52 +0000
commit8e428017af6ef4cad37e7b98c4be663619f35f7a (patch)
tree37b820963147d331f5f3ea112c26a776d677ca9b
parent41fafd53147b31aa71f0ca32b797f60848af926e (diff)
downloadpfsense-8e428017af6ef4cad37e7b98c4be663619f35f7a.zip
pfsense-8e428017af6ef4cad37e7b98c4be663619f35f7a.tar.gz
Do not try to be smart on the package name and also use a better resulting condition testing.
-rw-r--r--etc/inc/pkg-utils.inc7
1 files changed, 3 insertions, 4 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 44757d6..0b6b2c4 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -99,8 +99,7 @@ conf_mount_ro();
*
******/
function remove_freebsd_package($packagestring) {
- $todel = substr(reverse_strrchr($packagestring, "."), 0, -1);
- exec("/usr/sbin/pkg_delete -x {$todel}");
+ exec("/usr/sbin/pkg_delete -x {$packagestring}");
}
/****f* pkg-utils/is_package_installed
@@ -456,7 +455,7 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url =
$depend_filename = $working_depend[1] . $pkg_extension;
else
$depend_filename = $working_depend[1];
- if (is_freebsd_pkg_installed($working_depend[1]) === false) {
+ if (!is_freebsd_pkg_installed($working_depend[1])) {
if (pkg_fetch_recursive($working_depend[1], $depend_filename, $dependlevel + 1, $base_url) == false)
return false;
} else {
@@ -1083,4 +1082,4 @@ function squash_from_bytes($size, $round = "") {
return;
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud