summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-02-06 20:43:34 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-02-06 20:43:34 +0000
commit7ccf993186b6efc74dd0044f3055e01780f00af7 (patch)
tree3dd39d0f9c5b5b8b808d2582158abfe46f4001b8 /etc
parent7bbfe0077567b5c1f042aec9d2ced213146e078d (diff)
downloadpfsense-7ccf993186b6efc74dd0044f3055e01780f00af7.zip
pfsense-7ccf993186b6efc74dd0044f3055e01780f00af7.tar.gz
Break the stalemate for invalid packages by removing them (force deinstall).
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pkg-utils.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 03dda22..2395f23 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -244,10 +244,12 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) {
if (file_exists('/usr/local/pkg/' . $include_file))
require_once('/usr/local/pkg/' . $include_file);
else
- if (file_exists($include_file))
+ if (file_exists('/usr/local/pkg/' . $include_file)) {
require_once($include_file);
- else
+ } else {
log_error("Could not locate {$include_file}.");
+ force_remove_package($package['name']);
+ }
}
/* XXX: Zend complains about the next line "Wrong break depth"
OpenPOWER on IntegriCloud