On Sat, May 07, 2005 at 03:18:17PM +1000, Daniel Wyeth wrote:
> On 07/05/2005, at 12:58 AM, Martin Costabel wrote:
> >
> >Just a small remark to this point: The {Pre,Post}{Inst,Rm}Scripts  
> >already are always executed as a whole with a first line #!/bin/sh  
> >thrown in by fink. After you install the package, you can find the  
> >final form of these scripts in %p/var/lib/dpkg/info/.
> 
> I see now... when I saw errors for the Install Script, I presumed  
> that the same problem would pertain to the Pre and Post Scripts as  
> well, but of course these are executed by dpkg as single units unlike  
> the Install Script which is executed line by line by fink itself.
> 
> As a matter of interest, would it not be more consistent to execute  
> the Install Script as a single entity also, in the same way as the  
> Pre and Post Scripts in the deb are?  Just a thought, as I've been  
> using fink for only 48 hours now and am still getting used to its  
> idiosyncrasies.

That seems like a pretty big change...I know some of the almost 8000
.info files in the 10.3 and 10.4 trees rely on the existing behavior
(each line starting with the original env vars and working directory).

There are many things about fink that do not behave exactly as one
might expect, which is why we have extensive documentation. A good
place to learn all the specifics about each .info field is the
Packaging Manual (in the Documentation tab off fink's homepage). In
section 5.2 ("Fields"), you will see the description of the
InstallScript field:

  A list of commands that are run in the install phase. See the note
  on scripts below.

Looks like we forgot to hyperlink to that "below", but you can find
section 5.4 ("Scripts"):

  This field can be a simple list of commands. This is sort of like a
  shell script. However, the commands are executed via system(), one
  line at a time, so setting variables or changing the directory only
  affects commands on that same line.[...] Alternately, you can embed
  a complete script here, using the interpreter of your choice. As
  with any Unix script, the first line must begin with #! followed by
  the full pathname of to the interpreter and any needed flags (e.g.,
  #!/bin/csh, #!/bin/bash -ev, etc.). In this situation, the whole
  *Script field is dumped into a temporary file that is then executed.

Conversely, the description for PreInstScript (and the other dpkg
scripts) reads:

  These fields specify pieces of shell scripts that will be called
  when the package is installed, upgraded or removed. Fink
  automatically adds the shell script header #!/bin/sh,

Hope this clears up the mystery for you.

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to