summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-09-09 21:20:57 +0000
committerErmal Luçi <eri@pfsense.org>2009-09-09 21:21:04 +0000
commit83cfae8d540e818cc661df271889cbd4614b3ecf (patch)
tree17d36b62249d0c2a469dd40736ae825fed89154c /etc/inc/pkg-utils.inc
parent51043cd13e101402ea5ae295c1f74c6a5449cc44 (diff)
downloadpfsense-83cfae8d540e818cc661df271889cbd4614b3ecf.zip
pfsense-83cfae8d540e818cc661df271889cbd4614b3ecf.tar.gz
Remove wrongly duplicated code. Leave a comment on the oddity that is the packages code.
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc18
1 files changed, 8 insertions, 10 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 551e2d0..38b42c6 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -302,16 +302,14 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) {
$include_file = $pkg_config['include_file'];
if (file_exists($include_file))
require_once($include_file);
- else
- if (file_exists($include_file)) {
- require_once($include_file);
- } else {
- log_error("Could not locate {$include_file}.");
- install_package($package['name']);
- uninstall_package_from_name($package['name']);
- remove_freebsd_package($package['name']);
- install_package($package['name']);
- }
+ else {
+ /* XXX: What the heck is this?! */
+ log_error("Could not locate {$include_file}.");
+ install_package($package['name']);
+ uninstall_package_from_name($package['name']);
+ remove_freebsd_package($package['name']);
+ install_package($package['name']);
+ }
}
/* XXX: Zend complains about the next line "Wrong break depth"
OpenPOWER on IntegriCloud