X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/5e82366ac73be45fa284b6077c01cabb4fd11378..c78a8045277660482e922fc8677095c5d5a60946:/scripts/feeds diff --git a/scripts/feeds b/scripts/feeds index f2ffc3ef6..5e27487e4 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -221,7 +221,7 @@ sub list_feed { my $feed = shift; get_feed($feed); - foreach my $name (sort { lc($a) cmp lc($b) } keys %package) { + foreach my $name (sort { lc($a) cmp lc($b) } keys %$feed_package) { my $pkg = $feed_package->{$name}; next if $pkg->{vdepends}; if($pkg->{name}) { @@ -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/^\+//; @@ -394,7 +397,7 @@ sub install { if (!defined($opts{p}) or $opts{p} eq $f->[1]) { printf "Installing all packages from feed %s.\n", $f->[1]; get_feed($f->[1]); - foreach my $name (sort { lc($a) cmp lc($b) } keys %package) { + foreach my $name (sort { lc($a) cmp lc($b) } keys %$feed_package) { my $p = $feed_package->{$name}; next if $p->{vdepends}; if( $p->{name} ) {