Blame SOURCES/perl-Tk-Preserve-mode-on-pTk-files.patch

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