Revision: 2833
          http://gar.svn.sourceforge.net/gar/?rev=2833&view=rev
Author:   dmichelsen
Date:     2009-01-14 20:38:19 +0000 (Wed, 14 Jan 2009)

Log Message:
-----------
mGAR v2: Allow stripping of non-writable binaries. This fixes bug [ 2236412 ]

Modified Paths:
--------------
    csw/mgar/gar/v2/bin/stripbin

Modified: csw/mgar/gar/v2/bin/stripbin
===================================================================
--- csw/mgar/gar/v2/bin/stripbin        2009-01-14 16:52:24 UTC (rev 2832)
+++ csw/mgar/gar/v2/bin/stripbin        2009-01-14 20:38:19 UTC (rev 2833)
@@ -23,7 +23,13 @@
 
        if ($filechar =~ /ELF/ && $filechar =~ /not stripped/) {
                print "Stripping $file ... ";
+
+               # Make sure we can write to the file
+               my $perm = (stat $file)[2] & 07777;
+               print "making file temporarily writable ... " unless( $perm & 
0200 );
+                chmod($perm | 0200, $file);
                system "strip", $file and die "Failed.";
+               chmod($perm, $file);
                print "Done.\n";
        }
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
_______________________________________________
devel mailing list
[email protected]
https://lists.opencsw.org/mailman/listinfo/devel

Reply via email to