summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-03-10 03:40:11 +0000
committerColin Smith <colin@pfsense.org>2005-03-10 03:40:11 +0000
commite04de7201cc8cd7086b5a0ef97f95063dcfdd6b2 (patch)
tree95c6ff575e3c2742ee5a22d62312b046fe3e2e06 /etc
parentd0e48055dffdf4ad759307b96473d315da9299f8 (diff)
downloadpfsense-e04de7201cc8cd7086b5a0ef97f95063dcfdd6b2.zip
pfsense-e04de7201cc8cd7086b5a0ef97f95063dcfdd6b2.tar.gz
Use depend name from package XML instead of (possibly inaccurate) stripped filename.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 12496e7..de767e5 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -665,14 +665,15 @@ function get_package_xml_depends($pkg_name) {
if($pkg_xml['additional_files_needed'] != "") {
foreach($pkg_xml['additional_files_needed'] as $item) {
$depend_file = substr(strrchr($item['item'], "/"),1); // Strip URLs down to filenames.
- $depend_name = reverse_strrchr($depend_file, "."); // Strip filename down to dependency name.
if(!preg_match("/\.xml/i", $depend_file)) break; // If the file doesn't end in .xml (case-insensitive) exit the loop.
if(!file_exists("/usr/local/pkg/" . $pkg_name)) {
+ $depend_name = reverse_strrchr($depend_file, "."); // Strip filename down to dependency name.
log_error("Fetching missing dependency \(" . $depend_name . "\) for " . $pkg_name);
mwexec("/usr/bin/fetch -o /usr/local/pkg/" . $depend_file . " " . $item['item']);
}
if ($format = "names") {
- $depends[] = $depend_name;
+ $depend_xml = parse_xml_config_pkg("/usr/local/pkg/" . $depend_file, "packagegui");
+ $depends[] = $depend_xml['name'];
} else {
$depends[] = $depend_file;
}
OpenPOWER on IntegriCloud