diff options
author | obache <obache@pkgsrc.org> | 2013-02-16 07:32:28 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2013-02-16 07:32:28 +0000 |
commit | 461e0144de12e8d145571daf3701c06303e05065 (patch) | |
tree | eb8949e0b0b19212c4422d6ec3bb91bbe77c8952 /mk | |
parent | 2ed0bd949e30ac231c798332d962d3656b5ae5b2 (diff) | |
download | pkgsrc-461e0144de12e8d145571daf3701c06303e05065.tar.gz |
Remove fetched file if fetch command succeeds to fetch but checksum mismatch
with PKG_RESUME_TRANSFERS=YES.
PR 39896.
Diffstat (limited to 'mk')
-rwxr-xr-x | mk/fetch/fetch | 3 | ||||
-rw-r--r-- | mk/fetch/fetch.mk | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/mk/fetch/fetch b/mk/fetch/fetch index 397be2dde0d..7ba04c36d82 100755 --- a/mk/fetch/fetch +++ b/mk/fetch/fetch @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: fetch,v 1.14 2009/08/02 02:38:52 joerg Exp $ +# $NetBSD: fetch,v 1.15 2013/02/16 07:32:28 obache Exp $ # # Copyright (c) 2006 The NetBSD Foundation, Inc. # All rights reserved. @@ -246,6 +246,7 @@ if ${TEST} -n "$resume"; then if ${TEST} -f $path; then ${CP} -f $path $outputpath else + ${RM} -f $outputpath ${TOUCH} $outputpath fi fi diff --git a/mk/fetch/fetch.mk b/mk/fetch/fetch.mk index 7df2a90a1da..678cbac74ff 100644 --- a/mk/fetch/fetch.mk +++ b/mk/fetch/fetch.mk @@ -1,4 +1,4 @@ -# $NetBSD: fetch.mk,v 1.59 2013/02/07 13:59:10 obache Exp $ +# $NetBSD: fetch.mk,v 1.60 2013/02/16 07:32:28 obache Exp $ _MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}} _MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}} @@ -248,6 +248,7 @@ _FETCH_CMD= ${PKGSRC_SETENV} CHECKSUM=${_CHECKSUM_CMD:Q} \ FETCH_RESUME_ARGS=${_FETCH_RESUME_ARGS.${FETCH_USING}:Q} \ FETCH_OUTPUT_ARGS=${_FETCH_OUTPUT_ARGS.${FETCH_USING}:Q} \ MKDIR=${TOOLS_MKDIR:Q} MV=${TOOLS_MV:Q} \ + RM=${TOOLS_RM:Q} \ TEST=${TOOLS_TEST:Q} TOUCH=${TOOLS_TOUCH:Q} \ WC=${TOOLS_WC:Q} \ ${SH} ${PKGSRCDIR}/mk/fetch/fetch |