diff mbox series

[1/4] package/pkg-generic.mk: legal-info: create redist directory for override

Message ID 20240914095501.194725-1-arnout@mind.be
State Accepted
Headers show
Series [1/4] package/pkg-generic.mk: legal-info: create redist directory for override | expand

Commit Message

Arnout Vandecappelle Sept. 14, 2024, 9:54 a.m. UTC
Commit aacca7f0639bac6bb3fb262d0b1738c4387edeb0 introduced the
possibility to also create tarballs for packages that are local or
overridden (i.e., with a custom version). However, it forgot to create
the directory in which that tarball is stored. The original patch did,
but it was reworked by Arnout to use mk_tar_gz instead of tar directly,
and the mkdir was dropped there.

This failure was silent because the mk_tar_gz function doesn't exit on
error. The following error was printed but ignored:

    support/download/helpers: line 68: .../legal-info/sources/busybox-custom/busybox-custom.tar.gz: No such file or directory

Create the directory before calling mk_tar_gz.

Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
Cc: Nicolas Carrier <carrier.nicolas0@gmail.com>
Reported-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/pkg-generic.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Yann E. MORIN Sept. 14, 2024, 1:12 p.m. UTC | #1
Arnout, All,

On 2024-09-14 11:54 +0200, Arnout Vandecappelle via buildroot spake thusly:
> Commit aacca7f0639bac6bb3fb262d0b1738c4387edeb0 introduced the
> possibility to also create tarballs for packages that are local or
> overridden (i.e., with a custom version). However, it forgot to create
> the directory in which that tarball is stored. The original patch did,
> but it was reworked by Arnout to use mk_tar_gz instead of tar directly,
> and the mkdir was dropped there.
> 
> This failure was silent because the mk_tar_gz function doesn't exit on
> error. The following error was printed but ignored:
> 
>     support/download/helpers: line 68: .../legal-info/sources/busybox-custom/busybox-custom.tar.gz: No such file or directory
> 
> Create the directory before calling mk_tar_gz.
> 
> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
> Cc: Nicolas Carrier <carrier.nicolas0@gmail.com>
> Reported-by: Yann E. MORIN <yann.morin.1998@free.fr>

You confused me with the other me. ;-)

Applied to master with the proper reported-by assignment, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/pkg-generic.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 171163dcb4..69352b3730 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -1163,6 +1163,7 @@ ifneq ($$($(2)_OVERRIDE_SRCDIR),)
>  	$$(Q)rsync -au --chmod=u=rwX,go=rX $$(RSYNC_VCS_EXCLUSIONS) \
>  		$(call qstrip,$$($(2)_OVERRIDE_SRCDIR))/ \
>  		 $$($(2)_BUILDDIR)/.legal-info-rsync/
> +	$$(Q)mkdir -p $$($(2)_REDIST_SOURCES_DIR)
>  	$$(Q). support/download/helpers; set -x; cd $$($(2)_BUILDDIR); TAR=$$(TAR) mk_tar_gz \
>  		$$($(2)_BUILDDIR)/.legal-info-rsync/ \
>  		$$($(2)_BASENAME_RAW) \
> -- 
> 2.46.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 171163dcb4..69352b3730 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -1163,6 +1163,7 @@  ifneq ($$($(2)_OVERRIDE_SRCDIR),)
 	$$(Q)rsync -au --chmod=u=rwX,go=rX $$(RSYNC_VCS_EXCLUSIONS) \
 		$(call qstrip,$$($(2)_OVERRIDE_SRCDIR))/ \
 		 $$($(2)_BUILDDIR)/.legal-info-rsync/
+	$$(Q)mkdir -p $$($(2)_REDIST_SOURCES_DIR)
 	$$(Q). support/download/helpers; set -x; cd $$($(2)_BUILDDIR); TAR=$$(TAR) mk_tar_gz \
 		$$($(2)_BUILDDIR)/.legal-info-rsync/ \
 		$$($(2)_BASENAME_RAW) \