mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 19:55:52 +02:00
Merge remote-tracking branch 'origin/master' into core110
This commit is contained in:
@@ -3,6 +3,7 @@ etc/issue
|
||||
etc/httpd/conf/server-tuning.conf
|
||||
etc/rc.d/init.d/unbound
|
||||
etc/sysctl.conf
|
||||
opt/pakfire/lib/functions.pl
|
||||
srv/web/ipfire/cgi-bin/entropy.cgi
|
||||
srv/web/ipfire/cgi-bin/hardwaregraphs.cgi
|
||||
srv/web/ipfire/cgi-bin/index.cgi
|
||||
@@ -12,6 +13,7 @@ srv/web/ipfire/cgi-bin/system.cgi
|
||||
srv/web/ipfire/cgi-bin/vpnmain.cgi
|
||||
srv/web/ipfire/html/themes/darkdos/include/style.css
|
||||
srv/web/ipfire/html/themes/ipfire/include/css/style.css
|
||||
srv/web/ipfire/html/themes/ipfire-legacy/include/css/style.css
|
||||
srv/web/ipfire/html/themes/maniac/include/style.css
|
||||
usr/lib/firewall/ipsec-block
|
||||
usr/lib/libssp.so.0
|
||||
|
||||
@@ -541,7 +541,7 @@ sub dblist {
|
||||
}
|
||||
}
|
||||
|
||||
sub resolvedeps {
|
||||
sub resolvedeps_one {
|
||||
my $pak = shift;
|
||||
|
||||
getmetafile("$pak");
|
||||
@@ -553,7 +553,7 @@ sub resolvedeps {
|
||||
close(FILE);
|
||||
|
||||
my $line;
|
||||
my (@templine, @deps, @tempdeps, @all);
|
||||
my (@templine, @deps, @all);
|
||||
foreach $line (@file) {
|
||||
@templine = split(/\: /,$line);
|
||||
if ("$templine[0]" eq "Dependencies") {
|
||||
@@ -568,30 +568,41 @@ sub resolvedeps {
|
||||
message("PAKFIRE RESV: $pak: Dependency is already installed: $_");
|
||||
} else {
|
||||
message("PAKFIRE RESV: $pak: Need to install dependency: $_");
|
||||
push(@tempdeps,$_);
|
||||
push(@all,$_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (@tempdeps) {
|
||||
if ($_) {
|
||||
my @newdeps = resolvedeps("$_");
|
||||
foreach(@newdeps) {
|
||||
unless (($_ eq " ") || ($_ eq "")) {
|
||||
my $return = &isinstalled($_);
|
||||
if ($return eq 0) {
|
||||
message("PAKFIRE RESV: $pak: Dependency is already installed: $_");
|
||||
} else {
|
||||
message("PAKFIRE RESV: $pak: Need to install dependency: $_");
|
||||
push(@all,$_);
|
||||
}
|
||||
}
|
||||
return @all;
|
||||
}
|
||||
|
||||
sub resolvedeps {
|
||||
my $pak = shift;
|
||||
my @all;
|
||||
|
||||
# Resolve all not yet installed dependencies of $pak
|
||||
my @deps = &resolvedeps_one($pak);
|
||||
push(@all, @deps);
|
||||
|
||||
# For each dependency, we check if more dependencies exist
|
||||
while (@deps) {
|
||||
my $dep = pop(@deps);
|
||||
|
||||
my @subdeps = &resolvedeps_one($dep);
|
||||
foreach my $subdep (@subdeps) {
|
||||
# Skip the package we are currently resolving for
|
||||
next if ($pak eq $subdep);
|
||||
|
||||
# If the package is not already to be installed,
|
||||
# we add it to the list (@all) and check if it has
|
||||
# more dependencies on its own.
|
||||
unless (grep {$_ eq $subdep} @all) {
|
||||
push(@deps, $subdep);
|
||||
push(@all, $subdep);
|
||||
}
|
||||
}
|
||||
}
|
||||
message("");
|
||||
chomp (@all);
|
||||
|
||||
return @all;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user