From: John Crispin Date: Thu, 22 Jan 2015 13:13:09 +0000 (+0000) Subject: build: revert r44076 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b6f268d775c8b7986667ccb685f985dcdf425cb0;p=openwrt%2Fstaging%2Fansuel.git build: revert r44076 the patch causes issues when installing feeds Signed-off-by: John Crispin SVN-Revision: 44078 --- diff --git a/include/scan.awk b/include/scan.awk deleted file mode 100644 index 39b2977228..0000000000 --- a/include/scan.awk +++ /dev/null @@ -1,17 +0,0 @@ -BEGIN { FS="/" } -$1 ~ /^feeds/ { FEEDS[$NF]=$0 } -$1 !~ /^feeds/ { PKGS[$NF]=$0 } -END { - # Filter-out OpenWrt packages which have a feeds equivalent - for (pkg in PKGS) - if (pkg in FEEDS) - delete PKGS[pkg] - n = asort(PKGS) - for (i=1; i <= n; i++) { - print PKGS[i] - } - n = asort(FEEDS) - for (i=1; i <= n; i++){ - print FEEDS[i] - } -} diff --git a/include/scan.mk b/include/scan.mk index 138707db08..0998333439 100644 --- a/include/scan.mk +++ b/include/scan.mk @@ -43,7 +43,7 @@ endef $(FILELIST): rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-* - $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -f include/scan.awk > $@ + $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) ( \ diff --git a/scripts/feeds b/scripts/feeds index 6c0337581c..31ad544994 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -358,7 +358,6 @@ sub is_core_package($) { sub install_package { my $feed = shift; my $name = shift; - my $force = shift; my $ret = 0; $feed = lookup_package($feed, $name); @@ -384,22 +383,13 @@ sub install_package { $src or $src = $name; # previously installed packages set the runtime package - # newly installed packages set the source package to 1 - $installed{$src} and $installed{$src} == 1 and return 0; - - # we'll trigger the override only with the 3 conditions below: - # - override is allowed by command line (-f) - # - a package with the same src exists in the core packages list - # - the package previously installed is not from a feed - my $override = 1 if ($force and is_core_package($src) and !$installed{$src}->{feed}); + # newly installed packages set the source package + $installed{$src} and return 0; # check previously installed packages - $installed{$name} and !$override and return 0; + $installed{$name} and return 0; $installed{$src} = 1; - - $override == 1 - and warn "Overriding package '$src'\n" - or warn "Installing package '$src'\n"; + warn "Installing package '$src'\n"; $install_method{$type} or do { warn "Unknown installation method: '$type'\n"; @@ -446,7 +436,7 @@ sub install { my $feed; my $ret = 0; - getopts('ap:d:fh', \%opts); + getopts('ap:d:h', \%opts); if ($opts{h}) { usage(); @@ -472,7 +462,7 @@ sub install { my $p = $feed_package->{$name}; next if $p->{vdepends}; if( $p->{name} ) { - install_package($feed, $p->{name}, exists($opts{f})) == 0 or $ret = 1; + install_package($feed, $p->{name}) == 0 or $ret = 1; get_feed($f->[1]); } } @@ -480,7 +470,7 @@ sub install { } } else { while ($name = shift @ARGV) { - install_package($feed, $name, exists($opts{f})) == 0 or $ret = 1; + install_package($feed, $name) == 0 or $ret = 1; } } @@ -648,7 +638,6 @@ Commands: -a : Install all packages from all feeds or from the specified feed using the -p option. -p : Prefer this feed when installing packages. -d : Set default for newly installed packages. - -f : Install will be forced even if the package exists in core OpenWrt (override) search [options] : Search for a package Options: