[OpenWrt-Devel] [PATCHv2] scripts/feeds: observe -p flag for preferential feeds

Karl Palsson karlp at tweak.net.au
Wed May 27 12:03:36 EDT 2015


From: Karl Palsson <karlp at remake.is>

lookup_target was trampling the $feed variable, resulting in the -p flag
no longer preferentially installing from the named feed.

Make sure to use a local variable for this instead.

Signed-off-by: Karl Palsson <karlp at remake.is>
---
Changes since v1:
 Make sure to not just trample a global variable.  Aren't globals fun. Thanks
 to Felix for pointing it out

 scripts/feeds | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/feeds b/scripts/feeds
index a6be9cc..55756d9 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -450,10 +450,10 @@ sub install_package {
 	my $force = shift;
 	my $ret = 0;
 
-	$feed = lookup_target($feed, $name);
-	$feed and do {
+	my $this_feed_target = lookup_target($feed, $name);
+	$this_feed_target and do {
 		$installed_targets{$name} and return 0;
-		install_target($feed, $name);
+		install_target($this_feed_target, $name);
 		return 0;
 	};
 
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list