Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


2012/3/2 Thomas Collerton <tom.coll91@gmail.com>

Hi, thanks for the tip. This is an improved (hopefully) version of the
patch =)
Cheers!


2012/2/29 Michael Meeks <michael.meeks@suse.com>

Hi there,

On Wed, 2012-02-29 at 11:58 +0100, Thomas Collerton wrote:
this patch accomplishes what the EasyHack requests =)

        Thanks - pushed it :-)

       Personally, I'd have split out the 'write_args' type functionality
below that into a method of it's own, and added a read_args / write_args
pair - so that all the I/O is in perl rather than a system forked
whatnot but ... ! :-) I'm paranoid too - we should have cp around on all
systems that run this.

       Ta. very much, can you close the bug ?

       Thanks,

               Michael.

--
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot



From 4a7c6aa1efcff881a3552f43c244e4ac0c1240c8 Mon Sep 17 00:00:00 2001
From: Thomas Collerton <tom.coll91@gmail.com>
Date: Fri, 2 Mar 2012 20:21:59 +0100
Subject: [PATCH] Improvement to fdo#46565

---
 autogen.sh |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 2133d07..2935619 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -146,7 +146,12 @@ if (defined $ENV{NOCONFIGURE}) {
         if (scalar(@cmdline_args) > 0) {
             # if there's already an autogen.lastrun, make a backup first
             if (-e "autogen.lastrun") {
-                system("cp autogen.lastrun autogen.lastrun.bak");
+                open (my $fh, "autogen.lastrun") || warn "can't open autogen.lastrun. \n";
+                open (BAK, ">autogen.lastrun.bak") || warn "can't create backup file. \n";
+                while (<$fh>) {
+                    print BAK;
+                }
+                close (BAK) && close ($fh);
             }
             # print "writing args to autogen.lastrun\n";
             my $fh;
@@ -159,7 +164,8 @@ if (defined $ENV{NOCONFIGURE}) {
     }
     elsif ( ! -e "autogen.lastrun")
     {
-        system("touch autogen.lastrun");
+        open (my $fh, ">autogen.lastrun") || die "can't create autogen.lastrun";
+        close ($fh);
     }
     print "running ./configure with '" . join ("' '", @args), "'\n";
     system ("./configure", @args) && die "Error running configure";
-- 
1.7.9.2


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.