From 24e7398e225fc288d0a299fc6cd77fcf1539835c Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 16 Jan 2023 16:55:41 +0100 Subject: just-mr fetch: fix overwriting distfiles Both, the python script as well as the compiled variant of just-mr fetch try to overwrite already existing distfiles in the distdir. While it is unclear if overwriting existing distfiles or not copying to distdir if a file with that name already exists is the better behaviour, we at least should not error out, as the compiled just-mr currently does as it sets permission to 444 and hence cannot overwrite later; fix this by addwing owner write permissions before overwriting. --- test/end-to-end/just-mr/fetch.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/end-to-end/just-mr/fetch.sh b/test/end-to-end/just-mr/fetch.sh index 8009f151..8bd78929 100644 --- a/test/end-to-end/just-mr/fetch.sh +++ b/test/end-to-end/just-mr/fetch.sh @@ -67,4 +67,10 @@ newfoocontent=$(git hash-object "${DISTDIR}/foo-1.2.3.tar") echo "Foo archive has now content ${newfoocontent}" test "${newfoocontent}" = "${foocontent}" +# Verify that fetching accepts distfiles already present +"${JUST_MR}" --local-build-root "${LBR}" --distdir "${DISTDIR}" fetch 2>&1 +newfoocontent=$(git hash-object "${DISTDIR}/foo-1.2.3.tar") +echo "Foo archive has now content ${newfoocontent}" +test "${newfoocontent}" = "${foocontent}" + echo OK -- cgit v1.2.3