scripts/feeds: fix some installation warnings for locally installed packages
[openwrt/staging/lynxis/omap.git] / scripts / feeds
index 78e65ad1d5c184584d34a122bd8376751885141d..b5abfc8cea768cb057ca77498499e389a0936fd6 100755 (executable)
@@ -245,7 +245,7 @@ sub install_package {
        $feed or do {
                $installed{$name} and return 0;
                # TODO: check if it's already installed within ./package directory
-               warn "WARNING: No feed for package '$name' found, maybe it's already part of the standard packages?\n";
+               $srcpackage{$name} or -d "./package/$name" or warn "WARNING: No feed for package '$name' found, maybe it's already part of the standard packages?\n";
                return 0;
        };
 
@@ -280,10 +280,12 @@ sub install_package {
        };
 
        # install all dependencies
-       foreach my $dep (@{$pkg->{depends}}, @{$pkg->{builddepends}}) {
-               next if $dep =~ /@/;
-               $dep =~ s/^\+//;
-               install_package($feed, $dep) == 0 or $ret = 1;
+       foreach my $vpkg (@{$srcpackage{$src}}) {
+               foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}) {
+                       next if $dep =~ /@/;
+                       $dep =~ s/^\+//;
+                       install_package($feed, $dep) == 0 or $ret = 1;
+               }
        }
 
        return $ret;