From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: [PATCH] Improve shell script headers and pre-inst-env handling Date: Mon, 11 Feb 2013 20:45:10 -0500 Message-ID: <87haliz4nt.fsf@tines.lan> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U54w2-00072v-Rb for bug-guix@gnu.org; Mon, 11 Feb 2013 20:45:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U54w0-0002QE-SU for bug-guix@gnu.org; Mon, 11 Feb 2013 20:45:26 -0500 Received: from world.peace.net ([96.39.62.75]:43748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U54w0-0002Pt-OP for bug-guix@gnu.org; Mon, 11 Feb 2013 20:45:24 -0500 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: bug-guix@gnu.org Hello all, I've attached two patches. The first arranges to make sure that 'pre-inst-env' will be rebuilt when 'pre-inst-env.in' is modified. The second patch is the main subject of this email. It reworks the shell script headers at the top of 'guix-package' and the other scripts to avoid modifying environment variables (which could propagate to unrelated subprocesses that use libguile), and to avoid prepending installed directories to the guile load paths in the case where 'pre-inst-env' is being used. My approach here might be controversial, given that the resulting code is a bit longer, so if you don't like it, no worries :) However, I do find it nice to write more scheme and less shell code, and as a bonus the scheme code at the top is properly handled by emacs and paredit as if it were in the main body of the file. What do you think? Mark