This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Keep patch file permissions in mklog
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 31 May 2014 09:47:27 +0200
- Subject: [PATCH] Keep patch file permissions in mklog
- Authentication-results: sourceware.org; auth=none
Geoff,
Currently, mklog resets the permissions on a patch file:
...
$ touch tmp.patch
$ ls -la tmp.patch
-rw-rw-r-- 1 vries vries 0 mei 31 09:17 tmp.patch
$ ./contrib/mklog tmp.patch
$ ls -la tmp.patch
-rw------- 1 vries vries 59 mei 31 09:17 tmp.patch
$
...
This patch fixes that:
...
$ rm tmp.patch
$ touch tmp.patch
$ ls -la tmp.patch
-rw-rw-r-- 1 vries vries 0 mei 31 09:41 tmp.patch
$ ./contrib/mklog tmp.patch
$ ls -la tmp.patch
-rw-rw-r-- 1 vries vries 59 mei 31 09:41 tmp.patch
...
OK for trunk?
Thanks,
- Tom
2014-05-31 Tom de Vries <tom@codesourcery.com>
* mklog: Keep permissions on patch file.
diff --git a/contrib/mklog b/contrib/mklog
index fb489b0..d6f3556 100755
--- a/contrib/mklog
+++ b/contrib/mklog
@@ -264,7 +264,7 @@ foreach my $clname (keys %cl_entries) {
}
# Concatenate the ChangeLog template and the original .diff file.
-system ("cat $diff >>$temp && mv $temp $diff") == 0
+system ("cat $diff >>$temp && cat $temp >$diff && rm $temp") == 0
or die "Could not add the ChangeLog entry to $diff";
exit 0;
--
1.9.1