This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setup.exe remove scripts [Was: Re: experimental texmf packages]


Redirected to cygwin-apps.

----- Original Message -----
From: "Jan Nieuwenhuizen" <janneke@gnu.org>
Sent: Thursday, January 03, 2002 11:14 PM
Subject: Re: setup.exe remove scripts [Was: Re: experimental texmf
packages]


> "Robert Collins" <robert.collins@itdomain.com.au> writes:
>
> > Right, this is now in CVS> Sorry about the muckup.
>
> Ok, thanks, it's there.
>
> How should errors in postinstall scripts be handled?  It is tempting
> to replace
>
>     postinstall.cc:
>     find (cygpath ("/etc/postinstall", 0),
run_script_in_etc_postinstall);
>
> with something vaguely like
>
>    for (size_t n = 1; n <= db.packages.number (); n++)
>      if (try_run_script ("/etc/postinstall/", name))
>        warning ("postinstall of %s failed"
>                 "please examine or rerun /etc/postinstall/%s.sh
manually",
>                 name, name));
>
> But, afaik, there's no need for a package's postinstall script to be
> called '<pkg->name>.sh'?  Should/can we enforce something like this?

We could, but there is a more general way that is more flexible and
equally  effective:

The extraction process should note special files (ie anything in
/etc/postinstall) and associate that with the package object. This
solves postinstall script name guessing, and persistent storage of the
same solves removal script naming guesswork. As package files are
currently stored in gzipped flat file format, you can achieve the same
result for removal scripts by parsing the package file list.

Long term: This whole process need to be encapsulated in objects, and
then converted to a database (preferrable dpkg or rpm compatible).

Rob


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]