[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/23] Makefile: avoid leaving the temporary QEMU_PKG
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 19/23] Makefile: avoid leaving the temporary QEMU_PKGVERSION header file |
Date: |
Thu, 16 Feb 2017 15:31:43 +0100 |
From: Lin Ma <address@hidden>
By commit 67a1de0d, When we perform 'git pull && make && sudo make install',
In 'make' stage a qemu-version.h.tmp will be generated. If the content of
qemu-version.h.tmp and qemu-version.h aren't consistent, The qemu-version.h.tmp
will be renamed to qemu-version.h. Because of the target FORCE, The same action
will be do again in 'make install' stage.
In 'make install' stage, If there is no qemu-version.h.tmp exists and we run
'make install' with sudo, The owner and group of new qemu-version.h.tmp will be
privileged user/group. When we run 'make' next time, qemu-version.h.tmp can't
be overwritten because of permission issue.
This patch removed qemu-version.h.tmp after build to fix this issue.
Signed-off-by: Lin Ma <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index b993741..830fa5a 100644
--- a/Makefile
+++ b/Makefile
@@ -299,7 +299,11 @@ qemu-version.h: FORCE
printf '""\n'; \
fi; \
fi) > address@hidden)
- $(call quiet-command, cmp -s $@ address@hidden || mv address@hidden $@)
+ $(call quiet-command, if ! cmp -s $@ address@hidden; then \
+ mv address@hidden $@; \
+ else \
+ rm address@hidden; \
+ fi)
config-host.h: config-host.h-timestamp
config-host.h-timestamp: config-host.mak
--
1.8.3.1
- [Qemu-devel] [PULL 08/23] move vm_start to cpus.c, (continued)
- [Qemu-devel] [PULL 08/23] move vm_start to cpus.c, Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 10/23] hw/char/mcf_uart: QOMify the ColdFire UART, Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 11/23] cpu-exec: fix icount out-of-bounds access, Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 13/23] cpu-exec: avoid cpu_loop_exit in cpu_handle_interrupt, Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 12/23] cpu-exec: tighten barrier on TCG_EXIT_REQUESTED, Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 14/23] cpu-exec: avoid repeated sigsetjmp on interrupts, Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 16/23] qemu-doc: Clarify that -vga std is now the default, Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 15/23] cpu-exec: remove outermost infinite loop, Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 17/23] qemu-nbd: Implement socket activation., Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 18/23] vl: Move the cpu_synchronize_all_post_init() after generic devices initialization, Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 19/23] Makefile: avoid leaving the temporary QEMU_PKGVERSION header file,
Paolo Bonzini <=
- [Qemu-devel] [PULL 20/23] i386/cpu: add crash-information QOM property, Paolo Bonzini, 2017/02/16
- [Qemu-devel] [PULL 21/23] report guest crash information in GUEST_PANICKED event, Paolo Bonzini, 2017/02/16
[Qemu-devel] [PULL 22/23] vl: log available guest crash information, Paolo Bonzini, 2017/02/16
[Qemu-devel] [PULL 23/23] target-i386: correctly propagate retaddr into SVM helpers, Paolo Bonzini, 2017/02/16
Re: [Qemu-devel] [PULL 00/23] Misc patches for 2017-02-16, no-reply, 2017/02/16
Re: [Qemu-devel] [PULL 00/23] Misc patches for 2017-02-16, Peter Maydell, 2017/02/16