Skip to content

Commit

Permalink
fix output of make dependency-list (#6144)
Browse files Browse the repository at this point in the history
* fix output of make dependency-list
- avoid the make command and the list of all packages in the output
- this is a leftover of PR #6002

* remove global dependency-flat target
- dependency-flat is an internal target used dependency-list, dependency-tree and for some internal targets

* znc: fix for dependency-list

* avoid duplicates in dependency-flat

* build-action: fix prepare
- fix rename of spk names: remove only package with exact name from list

* remove dependency-kernel-list
- this was introduced in #5095
- BUT: we must not download kernel sources in prepare.sh, just as we don't do with toolchains
- if we want to optimize the download, we could cache the (extracted) kernel sources as we do for toolchains
  but since the cache is already at its limit, it is not possible to cache kernel sources without
  dropping other cached data.
  • Loading branch information
hgy59 committed Jun 17, 2024
1 parent eecb557 commit e5b2b44
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
10 changes: 3 additions & 7 deletions .github/actions/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ done

# fix for packages with different names
if [ "$(echo ${SPK_TO_BUILD} | grep -ow nzbdrone)" != "" ]; then
SPK_TO_BUILD=$(echo "${SPK_TO_BUILD}" | tr ' ' '\n' | grep -v "nzbdrone" | tr '\n' ' ')" sonarr3"
SPK_TO_BUILD=$(echo "${SPK_TO_BUILD}" | tr ' ' '\n' | grep -vw "nzbdrone" | tr '\n' ' ')" sonarr3"
fi
if [ "$(echo ${SPK_TO_BUILD} | grep -ow python)" != "" ]; then
SPK_TO_BUILD=$(echo "${SPK_TO_BUILD}" | tr ' ' '\n' | grep -v "python" | tr '\n' ' ')" python2"
SPK_TO_BUILD=$(echo "${SPK_TO_BUILD}" | tr ' ' '\n' | grep -vw "python" | tr '\n' ' ')" python2"
fi
if [ "$(echo ${SPK_TO_BUILD} | grep -ow ffmpeg)" != "" ]; then
SPK_TO_BUILD=$(echo "${SPK_TO_BUILD}" | tr ' ' '\n' | grep -v "ffmpeg" | tr '\n' ' ')" ffmpeg4"
SPK_TO_BUILD=$(echo "${SPK_TO_BUILD}" | tr ' ' '\n' | grep -vw "ffmpeg" | tr '\n' ' ')" ffmpeg4"
fi

# remove duplicate packages
Expand Down Expand Up @@ -120,10 +120,6 @@ else
for package in ${packages}
do
DOWNLOAD_LIST+=$(echo "${DEPENDENCY_LIST}" | grep "^${package}:" | grep -o ":.*" | tr ':' ' ' | sort -u | tr '\n' ' ')
for version in ${DEFAULT_TC}
do
DOWNLOAD_LIST+=$(make -C spk/${package} TCVERSION=${version} dependency-kernel-list | grep "^${package}:" | grep -o ":.*" | tr ':' ' ' | sort -u | tr '\n' ' ')
done
done
# remove duplicate downloads
downloads=$(printf %s "${DOWNLOAD_LIST}" | tr ' ' '\n' | sort -u | tr '\n' ' ')
Expand Down
15 changes: 2 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,30 +70,19 @@ native-%: native/%/Makefile
native-%-clean: native/%/Makefile
cd $(dir $^) && env $(MAKE) clean

# build dependency flat list for all packages
dependency-flat:
@echo $(filter-out $(dir $(wildcard spk/*/BROKEN)),$(dir $(wildcard spk/*/Makefile)))
@for spk in $(filter-out $(dir $(wildcard spk/*/BROKEN)),$(dir $(wildcard spk/*/Makefile))) ; \
do \
echo "$(MAKE) -s -C $${spk} dependency-flat" ; \
$(MAKE) -s -C $${spk} dependency-flat ; \
done

# build dependency tree for all packages
# - exclude broken packages
dependency-tree:
@echo $(filter-out $(dir $(wildcard spk/*/BROKEN)),$(dir $(wildcard spk/*/Makefile)))
@for spk in $(filter-out $(dir $(wildcard spk/*/BROKEN)),$(dir $(wildcard spk/*/Makefile))) ; \
do \
echo "$(MAKE) --no-print-directory -C $${spk} dependency-tree" ; \
$(MAKE) --no-print-directory -C $${spk} dependency-tree ; \
done

# build dependency list for all packages
# - exclude broken packages
dependency-list:
@echo $(filter-out $(dir $(wildcard spk/*/BROKEN)),$(dir $(wildcard spk/*/Makefile)))
@for spk in $(filter-out $(dir $(wildcard spk/*/BROKEN)),$(dir $(wildcard spk/*/Makefile))) ; \
do \
echo "$(MAKE) -s -C $${spk} dependency-list" ; \
$(MAKE) -s -C $${spk} dependency-list ; \
done

Expand Down
4 changes: 4 additions & 0 deletions cross/znc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://znc.in/releases/archive
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

ifeq ($(strip $(PYTHON_PACKAGE)),)
PYTHON_PACKAGE = python311
endif

BUILD_DEPENDS = cross/$(PYTHON_PACKAGE)
DEPENDS = cross/openssl3 cross/libicu cross/zlib

Expand Down
2 changes: 1 addition & 1 deletion mk/spksrc.dependency-tree.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependency-flat:
@echo "$(CURDIR)" | grep -Po "/\K(spk|cross|native|diyspk|toolchain)/.*"
@for depend in $$(echo "$(BUILD_DEPENDS) $(DEPENDS) $(OPTIONAL_DEPENDS)" | tr ' ' '\n' | sort -u | tr '\n' ' ') ; \
do \
DEPENDENCY_WALK=1 $(MAKE) -s -C ../../$$depend dependency-flat ; \
DEPENDENCY_WALK=1 $(MAKE) -s -C ../../$$depend dependency-flat | sort -u ; \
done

###

0 comments on commit e5b2b44

Please sign in to comment.