scripts/feeds: switch to the right feed metadata when installing a package to fix...
authorFelix Fietkau <nbd@openwrt.org>
Thu, 26 Aug 2010 15:13:47 +0000 (15:13 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 26 Aug 2010 15:13:47 +0000 (15:13 +0000)
SVN-Revision: 22815

scripts/feeds

index f2ffc3ef69761e7bac5f9b9899689955d4e9bb9a..f272e130968b764804bd22f4d96aee68a49878c2 100755 (executable)
@@ -307,6 +307,9 @@ sub install_package {
                return 0;
        };
 
+       # switch to the metadata for the selected feed
+       get_feed($feed->[1]);
+
        my $pkg = $feed{$feed->[1]}->{$name} or return 1;
        $pkg->{name} or do {
                $installed{$name} and return 0;
@@ -337,8 +340,8 @@ sub install_package {
                return 1;
        };
 
-       # install all dependencies
-       foreach my $vpkg (@{$feed_src->{$src}}, $pkg) {
+       # install all dependencies referenced from the source package
+       foreach my $vpkg (@{$feed_src->{$src}}) {
                foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}, @{$vpkg->{"builddepends/host"}}) {
                        next if $dep =~ /@/;
                        $dep =~ s/^\+//;