diff options
author | Renato Botelho <renato@netgate.com> | 2015-07-01 10:16:26 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-07-01 10:16:26 -0300 |
commit | e7553e1bab44e48bdd362a21df7ce292ec8640f7 (patch) | |
tree | b22794ea1596bee4bb0f05339d7b759cb469993d /etc | |
parent | 26994952a4c9efe69c072906da2fde1ead73b21b (diff) | |
download | pfsense-e7553e1bab44e48bdd362a21df7ce292ec8640f7.zip pfsense-e7553e1bab44e48bdd362a21df7ce292ec8640f7.tar.gz |
Remove packages from cache after install, also add debug messages
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index fd886d0..ed23227 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -226,14 +226,18 @@ function is_pkg_installed($pkg_name) { /* Install package, $pkg_name should not contain prefix */ function pkg_install($pkg_name) { global $g; + $result = false; pkg_remove_prefix($pkg_name); + pkg_debug("Installing package {$pkg_name}\n"); if (!is_pkg_installed($pkg_name)) { - return pkg_call("install -q -y " . $g['pkg_prefix'] . $pkg_name); + $result = pkg_call("install -y " . $g['pkg_prefix'] . $pkg_name); + /* Cleanup cacke to free disk space */ + pkg_call("clean -y"); } - return false; + return $result; } /* Delete package from FreeBSD, $pkg_name should not contain prefix */ |