install dependencies after installing package to avoid deep recursion and mass memory...
authorNicolas Thill <nico@openwrt.org>
Sun, 13 Apr 2008 22:36:51 +0000 (22:36 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 13 Apr 2008 22:36:51 +0000 (22:36 +0000)
SVN-Revision: 10823

scripts/feeds

index 2b50d5c1a5a4b954b01e71cdcadeaec7124a43fd..78e65ad1d5c184584d34a122bd8376751885141d 100755 (executable)
@@ -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;
 }