[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 2/4] build: don't create temporary files in sourc
From: |
Daniel P. Berrange |
Subject: |
[Qemu-devel] [PATCH v2 2/4] build: don't create temporary files in source dir |
Date: |
Fri, 27 Oct 2017 14:14:10 +0100 |
There are cases where users do VPATH builds with the source directory being on
a read-only volume. In such a case they have to manually run the command
'git-submodule.sh ...modules...' manually ahead of time. When checking for
status we should not then write into the source dir.
Signed-off-by: Daniel P. Berrange <address@hidden>
---
scripts/git-submodule.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index c66567d409..586ff32293 100755
--- a/scripts/git-submodule.sh
+++ b/scripts/git-submodule.sh
@@ -31,10 +31,10 @@ fi
case "$command" in
status)
test -f "$substat" || exit 1
- trap "rm -f ${substat}.tmp" EXIT
- $GIT submodule status $modules > "${substat}.tmp"
- test $? -ne 0 && error "failed to query git submodule status"
- diff "${substat}" "${substat}.tmp" >/dev/null
+ substat_tmp=$(mktemp)
+ trap "rm -f ${substat_tmp}" EXIT
+ $GIT submodule status $modules > "${substat_tmp}"
+ diff "${substat}" "${substat_tmp}" >/dev/null
exit $?
;;
update)
--
2.13.6
- [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, (continued)
- [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, Daniel P. Berrange, 2017/10/27
- Re: [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, Alexey Kardashevskiy, 2017/10/27
- Re: [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, Daniel P. Berrange, 2017/10/28
- Re: [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, Alexey Kardashevskiy, 2017/10/28
- Re: [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, Daniel P. Berrange, 2017/10/29
- Re: [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, Alexey Kardashevskiy, 2017/10/29
- Re: [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, Daniel P. Berrange, 2017/10/29
- Re: [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, Alexey Kardashevskiy, 2017/10/29
- Re: [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, Daniel P. Berrange, 2017/10/30
- Re: [Qemu-devel] [PATCH v2 1/4] build: allow setting a custom GIT binary for transparent proxying, Alexey Kardashevskiy, 2017/10/30
[Qemu-devel] [PATCH v2 2/4] build: don't create temporary files in source dir,
Daniel P. Berrange <=
[Qemu-devel] [PATCH v2 4/4] build: don't fail if given a git submodule which does not exist, Daniel P. Berrange, 2017/10/27
[Qemu-devel] [PATCH v2 3/4] build: allow automatic git submodule updates to be disabled, Daniel P. Berrange, 2017/10/27
Re: [Qemu-devel] [PATCH v2 0/4] Various improvements to submodule handling, Eric Blake, 2017/10/28