chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Prevent running applications from crashing


From: Felix
Subject: Re: [Chicken-hackers] [PATCH] Prevent running applications from crashing when reinstalling
Date: Thu, 04 Oct 2012 20:27:43 +0200 (CEST)

From: Felix <address@hidden>
Subject: Re: [Chicken-hackers] [PATCH] Prevent running applications from 
crashing when reinstalling
Date: Mon, 01 Oct 2012 19:55:10 +0200 (CEST)

> From: Christian Kellermann <address@hidden>
> Subject: [Chicken-hackers] [PATCH] Prevent running applications from crashing 
> when reinstalling
> Date: Mon, 1 Oct 2012 17:41:59 +0200
> 
>> Hi,
>> 
>> thanks to Jim for the suggestion, I have been changing chicken-install
>> to remove preexisting files before installing them. This enables me to
>> reinstall an egg and have the running application that uses that not
>> segfault as it did before. Tried with several eggs so far.
> 
> Signed off and pushed. I took the freedom to replace the invocation
> of "run" with

Here a suggestion which ought to work better:

diff --git a/setup-api.scm b/setup-api.scm
index 50ab484..0f54b9c 100644
--- a/setup-api.scm
+++ b/setup-api.scm
@@ -509,6 +509,9 @@
              (directory from)))
            (else
             (ensure-directory to)
+            (when (and (file-exists? to)
+                       (not (directory? to)))
+              (remove-file* to))
             (run (,*copy-command* 
                   ,(shellpath from)
                   ,(shellpath to))))))

Since all that file-handling mess in setup-api.scm confuses me, I
can't say that I'm absolutely sure that this handles all cases (We
need a new setup API - one that is so simple and straightforward that
it just can not be used wrongly).


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]