mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 14:16:31 +00:00
pkg-generic: refactor the "Downloading" message logic
In the .stamp_downloaded hook, the logic to decide whether or not to display the "Downloading" message is treating the check of <pkg>_SOURCE as a special case. But in fact, there is no real reason to do so: the existing loop used for <pkg>_PATCH and <pkg>_EXTRA_DOWNLOADS could work just as well. This commit therefore refactors this piece of code, to have a single loop checking <pkg>_SOURCE, <pkg>_PATCH and <pkg>_EXTRA_DOWNLOADS. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
parent
48296c5afd
commit
59e19c7e24
@ -73,16 +73,12 @@ $(BUILD_DIR)/%/.stamp_downloaded:
|
|||||||
$(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
|
$(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
|
||||||
ifeq ($(DL_MODE),DOWNLOAD)
|
ifeq ($(DL_MODE),DOWNLOAD)
|
||||||
# Only show the download message if it isn't already downloaded
|
# Only show the download message if it isn't already downloaded
|
||||||
$(Q)if test ! -e $(DL_DIR)/$($(PKG)_SOURCE); then \
|
$(Q)for p in $($(PKG)_SOURCE) $($(PKG)_PATCH) $($(PKG)_EXTRA_DOWNLOADS) ; do \
|
||||||
$(call MESSAGE,"Downloading") ; \
|
if test ! -e $(DL_DIR)/`basename $$p` ; then \
|
||||||
else \
|
$(call MESSAGE,"Downloading") ; \
|
||||||
for p in $($(PKG)_PATCH) $($(PKG)_EXTRA_DOWNLOADS) ; do \
|
break ; \
|
||||||
if test ! -e $(DL_DIR)/`basename $$p` ; then \
|
fi ; \
|
||||||
$(call MESSAGE,"Downloading") ; \
|
done
|
||||||
break ; \
|
|
||||||
fi ; \
|
|
||||||
done ; \
|
|
||||||
fi
|
|
||||||
endif
|
endif
|
||||||
$(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE:/=)/$($(PKG)_SOURCE)))
|
$(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE:/=)/$($(PKG)_SOURCE)))
|
||||||
$(foreach p,$($(PKG)_EXTRA_DOWNLOADS),$(call DOWNLOAD,$($(PKG)_SITE:/=)/$(p))$(sep))
|
$(foreach p,$($(PKG)_EXTRA_DOWNLOADS),$(call DOWNLOAD,$($(PKG)_SITE:/=)/$(p))$(sep))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user