net/rsync: Fix distinfo file generation

Fix a long standing issue in distinfo file generation caused
by the way patch distfiles are handled.

In the previous code, every time a patch was activated, it adds its own
entry into the DISTFILES variable, but because all the patches comes
from the same distfile, we ended with duplicate entries in the list.
As a consequence, the make makesum target generates a distinfo file with
duplicate entries, causing issues to the builder who tries to fetch and untar
the same file in paralel.

Now we add the distfile to the list if one of the options is activated,
avoiding duplication in the DISTFILES list.

This fix has no impact on the generated package, so no PORTREVISION
bump is required.
This commit is contained in:
Rodrigo Osorio 2022-10-23 16:40:36 +02:00
commit 1f2f7227e8

View file

@ -58,18 +58,15 @@ ZLIB_BASE_DESC= Use zlib from base instead of bundled one
PTS_DESC= Functionality provided by third party patches
RENAMED_DESC= Add support for renamed file detection
FLAGS_DISTFILES= ${PORTNAME}-patches-${DISTVERSION}${EXTRACT_SUFX}
FLAGS_EXTRA_PATCHES= ${WRKSRC}/patches/fileflags.diff \
${FILESDIR}/extrapatch-main.c
ICONV_DISTFILES= ${PORTNAME}-patches-${DISTVERSION}${EXTRACT_SUFX}
ICONV_USES= iconv:translit
ICONV_CONFIGURE_ENABLE= iconv iconv-open
POPT_PORT_LIB_DEPENDS= libpopt.so:devel/popt
POPT_PORT_CONFIGURE_OFF= --with-included-popt
RENAMED_DISTFILES= ${PORTNAME}-patches-${DISTVERSION}${EXTRACT_SUFX}
RENAMED_EXTRA_PATCHES= ${WRKSRC}/patches/detect-renamed.diff
SSH_CONFIGURE_ON= --with-rsh=ssh
@ -77,7 +74,9 @@ SSH_CONFIGURE_OFF= --with-rsh=rsh
ZLIB_BASE_CONFIGURE_ON= --with-included-zlib=no
.if make(makesum)
.include <bsd.port.options.mk>
.if make(makesum) || ${PORT_OPTIONS:MRENAMED} || ${PORT_OPTIONS:MICONV} || ${PORT_OPTIONS:MRENAMED}
DISTFILES+= ${PORTNAME}-patches-${DISTVERSION}${EXTRACT_SUFX}
.endif