From de3bf7e4c227f9947e352a4de3861c3475415f0a Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 22 Jan 2015 09:35:40 +0000 Subject: build: allow openwrt.git packages to be replaced by feeds Currently, replacing a package available in openwrt.git requires modifications in openwrt.git, or requires duplicating the package in a feed but with a different name, which causes all kind of problems related to dependencies (all packages selecting it would have to be modified accordingly to select the new package). With this change, if a package with the same name is present both in feeds/ and package/ folders, the one in feeds/ can override the one in package/, both in the menuconfig and during the build, by passing the "-f" option to "./scripts/feeds install" This mechanism is particularly useful for vendor tree, or in general for application which needs to replace one particular package which exists within openwrt.git by a custom/newer version. Signed-off-by: Mathieu Olivari SVN-Revision: 44076 --- include/scan.awk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 include/scan.awk (limited to 'include/scan.awk') diff --git a/include/scan.awk b/include/scan.awk new file mode 100644 index 0000000000..39b2977228 --- /dev/null +++ b/include/scan.awk @@ -0,0 +1,17 @@ +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] + } +} -- cgit v1.2.3