From 7ccf993186b6efc74dd0044f3055e01780f00af7 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 6 Feb 2007 20:43:34 +0000 Subject: Break the stalemate for invalid packages by removing them (force deinstall). --- etc/inc/pkg-utils.inc | 6 ++++-- 1 file 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" -- cgit v1.1