mirror of
https://gitlab.com/prpl-foundation/prplos/prplos.git
synced 2026-01-15 21:15:07 +00:00
Problem: With the new Overlay Feeds feature Makefile.append files would be appended to <package>/Makefile code, as result OpenWRT build system should interpret this files as <package>/Makefile dependency in same manner as includes defined with SCAN_DEPS variable. Cause: Overlay Feeds is a new feature and requires support for new files. Solution: Scan all enabled feeds for Makefile.append files and add "$(TOPDIR)/feeds/<feed_name>/path/to/<package>/Makefie.append" as dependency for "tmp/info/.packageinfo-<path_to_package>" files. References: PCF-1616 Signed-off-by: Nikolai Merinov <n.merinov@inango-systems.com>
30 lines
855 B
Awk
30 lines
855 B
Awk
BEGIN {
|
|
FS="/"
|
|
while ("for feed in $(./scripts/feeds list -n); do find -L feeds/${feed} -name Makefile.append | sort; done" | getline APPEND) {
|
|
nf=split(APPEND, parts)
|
|
APPENDS[parts[nf-1]]="$(TOPDIR)/" APPEND "\n" APPENDS[parts[nf-1]]
|
|
}
|
|
}
|
|
$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) {
|
|
print PKGS[pkg] > of
|
|
delete PKGS[pkg]
|
|
}
|
|
n = asorti(PKGS, PKGKEYS)
|
|
for (i=1; i <= n; i++) {
|
|
print PKGS[PKGKEYS[i]]
|
|
if (PKGKEYS[i] in APPENDS)
|
|
printf "%s", APPENDS[PKGKEYS[i]]
|
|
}
|
|
n = asorti(FEEDS, FEEDKEYS)
|
|
for (i=1; i <= n; i++){
|
|
print FEEDS[FEEDKEYS[i]]
|
|
if (FEEDKEYS[i] in APPENDS)
|
|
printf "%s", APPENDS[FEEDKEYS[i]]
|
|
}
|
|
}
|