X-Spam-Check-By: sourceware.org Message-ID: <45D6FE1D.F594AA43@dessent.net> Date: Sat, 17 Feb 2007 05:07:41 -0800 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Problems with setup.exe snapshots? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Angelo Graziosi wrote: > > It looks as a difficulty to copy post-texmf.sh in /etc/postinstall (adding > .done). > > The problems disappear if one uses setup.exe-2.510 (the official version). First, a note: tetex-base and tetex-tiny are meant to be mutually exclusive: you should install one or the other but not both. The -tiny provides a usable subset of the full -base functionality. (At least that's the way I understand it.) The reason for this problem is arguably due to a packaging error. All three of tetex-tiny,extra,base own the file /etc/postinstall/post-texmf.sh. This is a no-no, as no two packages should own the same file, otherwise when one is removed it will no longer remain for the other. The way this comes to happen with the postinstall is that setup first runs the postinstall for tetex-base, which succeeds, and is renamed to post-texmf.sh.done. Then it tries to run the postinstall for tetex-extra. But the .sh file does not exist so we get: 2007/02/17 04:46:04 running: C:\cygwin\bin\bash.exe -c /etc/postinstall/post-texmf.sh /usr/bin/bash: /etc/postinstall/post-texmf.sh: No such file or directory 2007/02/17 04:46:04 abnormal exit: exit code=127 Which corresponds to this code: if (retval) log(LOG_PLAIN) << "abnormal exit: exit code=" << retval << endLog;; /* if file exists then delete it otherwise just ignore no file error */ io_stream::remove ("cygfile://" + scriptName + ".done"); io_stream::move ("cygfile://" + scriptName, "cygfile://" + scriptName + ".done"); And as you can now see, the second invocation of the postinstall deletes the .done file that was renamed by the first invocation, and the file is now gone. The reason it did not happen with 2.510 was because that version was buggy. There are two passes that setup.exe uses to determine the list of postinstall scripts that need to be run. The first is that while unpacking package tarballs it keeps a running list of all files extracted under /etc/postinstall. It runs these first, renaming each to .done. In the second pass, it scans all files that remain under /etc/postinstall that do not have the .done extension and runs them. This allows for one postinstall script to dynamically create a postinstall script at runtime that did not exist in the package's tarball, for example. In setup.exe 2.510 there was a bug in the first pass that caused no files to ever match /etc/postinstall, so all packages ended up being processed by the second pass. This is, incidently, why 2.510 says "No Package" during the postinstall phase, whereas in the snapshot versions it actually says the current pacakage name during the postinstall routine. This is because the "first pass" method allows it to associate a package name with each script, whereas the "second pass" method does not allow to infer which package a script belongs to, so all it can say is "No Package". Sooo. These tetex packages need to be fixed so that there is no filename overlap. It would probably also be good to change setup so that it doesn't try to run the same postinstall script more than once. I can think of several ways to do this, I'm not sure which is best. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/