Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm Sender: cygwin-apps-owner AT cygwin DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT cygwin DOT com Message-ID: <099801c19453$381a2b00$0200a8c0@lifelesswks> From: "Robert Collins" To: "Jan Nieuwenhuizen" Cc: References: <878764062 DOT 20011128173421 AT nyckelpiga DOT de><4434079433 DOT 20011129221637 AT familiehaase DOT de><9517228633 DOT 20011203135833 AT familiehaase DOT de> <3C0D8535 DOT D67735D1 AT ece DOT gatech DOT edu><00d501c17d93$1936c990$0200a8c0 AT lifelesswks><01a801c18036$3d447350$0200a8c0 AT lifelesswks><027001c18040$c91651f0$0200a8c0 AT lifelesswks><04db01c18302$e66cae60$0200a8c0 AT lifelesswks><105201c18604$ea001670$0200a8c0 AT lifelesswks><097401c1944b$de1aa230$0200a8c0 AT lifelesswks> Subject: Re: setup.exe remove scripts [Was: Re: experimental texmf packages] Date: Thu, 3 Jan 2002 23:36:07 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-OriginalArrivalTime: 03 Jan 2002 12:35:58.0413 (UTC) FILETIME=[31F08FD0:01C19453] Redirected to cygwin-apps. ----- Original Message ----- From: "Jan Nieuwenhuizen" Sent: Thursday, January 03, 2002 11:14 PM Subject: Re: setup.exe remove scripts [Was: Re: experimental texmf packages] > "Robert Collins" 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 '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