Message ID | 5389890F.2050501@mentor.com |
---|---|
State | New |
Headers | show |
Cc Diego.
-----------------------------------------------
From: Tom de Vries <Tom_deVries@mentor.com>
Sent: Saturday, May 31, 2014 11:47AM
To: Geoff Keating <geoffk@geoffk.org>
Cc: GCC Patches
Subject: [PATCH] Keep patch file permissions in mklog
On 05/31/2014 11:47 AM, Tom de Vries wrote:
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