From b961e14af07eb4e119339bea02edd152695d191d Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 24 Sep 2008 23:21:23 +0000 Subject: [PATCH] Dependency check themes too --- install-module.pl | 1 + webmin/webmin-lib.pl | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/install-module.pl b/install-module.pl index 839493d89..f45abb50d 100755 --- a/install-module.pl +++ b/install-module.pl @@ -63,6 +63,7 @@ if (ref($rv)) { } } else { + $rv =~ s/<[^>]+>//g; print STDERR "Install failed : $rv\n"; } diff --git a/webmin/webmin-lib.pl b/webmin/webmin-lib.pl index 69d9dd69d..e1679803d 100644 --- a/webmin/webmin-lib.pl +++ b/webmin/webmin-lib.pl @@ -241,18 +241,20 @@ else { return $text{'install_enone'}; } - # Get the module.info files to check dependancies + # Get the module.info or theme.info files to check dependancies local $ver = &get_webmin_version(); local $tmpdir = &transname(); mkdir($tmpdir, 0700); local $err; local @realmods; foreach $m (keys %mods) { - next if (!$hasfile{$m,"module.info"}); + next if (!$hasfile{$m,"module.info"} && + !$hasfile{$m,"theme.info"}); push(@realmods, $m); local %minfo; - system("cd $tmpdir ; tar xf \"$file\" $m/module.info ./$m/module.info >/dev/null 2>&1"); - if (!&read_file("$tmpdir/$m/module.info", \%minfo)) { + system("cd $tmpdir ; tar xf \"$file\" $m/module.info ./$m/module.info $m/theme.info ./$m/theme.info >/dev/null 2>&1"); + if (!&read_file("$tmpdir/$m/module.info", \%minfo) && + !&read_file("$tmpdir/$m/theme.info", \%minfo)) { $err = &text('install_einfo', "$m"); } elsif (!&check_os_support(\%minfo)) {