aboutsummaryrefslogtreecommitdiffstats
path: root/include/scan.awk
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-01-22 09:35:40 +0000
committerJohn Crispin <blogic@openwrt.org>2015-01-22 09:35:40 +0000
commit7fdb8680e3e1c3f7f415e20186f0bcf0799fd801 (patch)
treefe04e7ef788200bc3981b7aa34e504bd5742e216 /include/scan.awk
parentf1328aff8efbbf37a6bace89a6728c2f2c9beee2 (diff)
downloadmaster-187ad058-7fdb8680e3e1c3f7f415e20186f0bcf0799fd801.tar.gz
master-187ad058-7fdb8680e3e1c3f7f415e20186f0bcf0799fd801.tar.bz2
master-187ad058-7fdb8680e3e1c3f7f415e20186f0bcf0799fd801.zip
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 <mathieu@qca.qualcomm.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44076 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/scan.awk')
-rw-r--r--include/scan.awk17
1 files changed, 17 insertions, 0 deletions
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]
+ }
+}