summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2023-01-16 16:55:41 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-01-16 17:47:29 +0100
commit24e7398e225fc288d0a299fc6cd77fcf1539835c (patch)
treed479ef9738b39163282f70234f7e396b7fae910e /test
parentddff40e1ad4869e21a35ff3e38fb23e06856b23f (diff)
downloadjustbuild-24e7398e225fc288d0a299fc6cd77fcf1539835c.tar.gz
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.
Diffstat (limited to 'test')
-rw-r--r--test/end-to-end/just-mr/fetch.sh6
1 files changed, 6 insertions, 0 deletions
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