From 3c41a0a3d6b5a02c18ab89eb6369e1680aa47ab7 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sat, 22 Apr 2017 15:12:50 +0200 Subject: [PATCH] Fix #1169 by deleting the egg-info file before (re)creating it If the user used "chicken-install" without sudo before, and later they use "chicken-install -s" to reinstall the same egg, the egg-info file will still exist. This means the shell redirect will simply clobber the existing file. Removing it first and then writing it will ensure the file is using the new owner and umask. --- egg-compile.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/egg-compile.scm b/egg-compile.scm index ba277b7..31faf46 100644 --- a/egg-compile.scm +++ b/egg-compile.scm @@ -698,6 +698,8 @@ EOF (define ((install-suffix mode name info) platform) (let* ((infostr (with-output-to-string (cut pp info))) + (dcmd (remove-file-command platform)) + (mkdir (mkdir-command platform)) (dir (destination-repository mode)) (qdir (quotearg (slashify dir platform))) (dest (quotearg (slashify (make-pathname dir name +egg-info-extension+) @@ -707,18 +709,21 @@ EOF ((unix) (printf #<~a~a <~a~a~% EOF - ddir qdir + mkdir ddir qdir (string-intersperse (string-split infostr "\n") "^\n\n") ddir dest))))) -- 2.1.4