|
|
077ec0 |
From ef70fd090dedebaa9fa6938d01655806fac2561a Mon Sep 17 00:00:00 2001
|
|
|
077ec0 |
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
077ec0 |
Date: Wed, 6 Nov 2013 14:15:34 +0100
|
|
|
077ec0 |
Subject: [PATCH] Preserve mode on pTk files
|
|
|
077ec0 |
MIME-Version: 1.0
|
|
|
077ec0 |
Content-Type: text/plain; charset=UTF-8
|
|
|
077ec0 |
Content-Transfer-Encoding: 8bit
|
|
|
077ec0 |
|
|
|
077ec0 |
Some pTk/*.[tm] files change mode during build. The result differs on
|
|
|
077ec0 |
differnt architectures and depends on external dependencies.
|
|
|
077ec0 |
|
|
|
077ec0 |
This burderns regression tests and there is not reason why to change
|
|
|
077ec0 |
the mode. So this patch coerces all modes to 0644 making resulting
|
|
|
077ec0 |
debuginfo files uniform.
|
|
|
077ec0 |
|
|
|
077ec0 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
077ec0 |
---
|
|
|
077ec0 |
pTk/mkVFunc | 4 ++--
|
|
|
077ec0 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
077ec0 |
|
|
|
077ec0 |
diff --git a/pTk/mkVFunc b/pTk/mkVFunc
|
|
|
077ec0 |
index e10a458..75194a2 100755
|
|
|
077ec0 |
--- a/pTk/mkVFunc
|
|
|
077ec0 |
+++ b/pTk/mkVFunc
|
|
|
077ec0 |
@@ -19,7 +19,7 @@ sub openRO
|
|
|
077ec0 |
my ($fh,$file) = @_;
|
|
|
077ec0 |
if (-f $file && !-w $file)
|
|
|
077ec0 |
{
|
|
|
077ec0 |
- chmod(0666,$file) || warn "Cannot change permissions on $file:$!";
|
|
|
077ec0 |
+ chmod(0644,$file) || warn "Cannot change permissions on $file:$!";
|
|
|
077ec0 |
}
|
|
|
077ec0 |
open($fh,">","$file~") || return 0;
|
|
|
077ec0 |
push(@Files,$file);
|
|
|
077ec0 |
@@ -33,7 +33,7 @@ END
|
|
|
077ec0 |
my $file = pop(@Files);
|
|
|
077ec0 |
if (-f $file)
|
|
|
077ec0 |
{
|
|
|
077ec0 |
- chmod(0444,"$file~") || warn "Cannot change permissions on $file:$!";
|
|
|
077ec0 |
+ chmod(0644,"$file~") || warn "Cannot change permissions on $file:$!";
|
|
|
077ec0 |
if (!rename("$file~",$file))
|
|
|
077ec0 |
{
|
|
|
077ec0 |
warn "Cannot rename $file to $file~ ($!), trying again with deleting $file before...";
|
|
|
077ec0 |
--
|
|
|
077ec0 |
1.8.3.1
|
|
|
077ec0 |
|