pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [patch] package.mk: use cp without -p if it fails



"Amitai Schleier" <schmonz%schmonz.com@localhost>:
> FWIW, I've been running for a long time with a similar local diff for 
> similar reasons (many VMs building binary packages into an NFS 
> location):
> 
> --- mk/pkgformat/pkg/package.mk
> +++ mk/pkgformat/pkg/package.mk
> @@ -66,7 +66,8 @@ ${PKGFILE}: ${STAGE_PKGFILE}
>          @${STEP_MSG} "Creating binary package ${.TARGET}"
>          ${RUN} ${MKDIR} ${.TARGET:H};                                   
> \
>          ${LN} -f ${STAGE_PKGFILE} ${PKGFILE} 2>/dev/null ||             
> \
> -               ${CP} -pf ${STAGE_PKGFILE} ${PKGFILE}
> +               ${CP} -pf ${STAGE_PKGFILE} ${PKGFILE} 2>/dev/null ||    
> \
> +               ${CMP} ${STAGE_PKGFILE} ${PKGFILE}
>   .endif

I'm afraid I don't know how that works. From what I can
see /usr/bin/cmp (which CMP is set to here) compares two files, how
does this fix the issue?


Home | Main Index | Thread Index | Old Index