1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 05:11:46 +02:00

install dependencies after installing package to avoid deep recursion and mass memory consuption

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10823 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2008-04-13 22:36:51 +00:00
parent e74c1c3499
commit 3f3f04ffd2

View File

@ -264,13 +264,6 @@ sub install_package {
# newly installed packages set the source package
$installed{$src} and return 0;
# install all dependencies
foreach my $dep (@{$pkg->{depends}}, @{$pkg->{builddepends}}) {
next if $dep =~ /@/;
$dep =~ s/^\+//;
install_package($feed, $dep) == 0 or $ret = 1;
}
# check previously installed packages
$installed{$name} and return 0;
$installed{$src} = 1;
@ -286,6 +279,13 @@ sub install_package {
return 1;
};
# install all dependencies
foreach my $dep (@{$pkg->{depends}}, @{$pkg->{builddepends}}) {
next if $dep =~ /@/;
$dep =~ s/^\+//;
install_package($feed, $dep) == 0 or $ret = 1;
}
return $ret;
}