This is the mail archive of the
mailing list for the Cygwin project.
Re: criteria for running preremove scripts?
On Thu, 7 Jul 2005, Eric Blake wrote:
> To try and test the new /etc/preremove/~~bash.sh bundled with
> bash-3.0-7, I reran setup and selected reinstall on bash. But looking
> in /var/log/setup.log.full, the script was removed without ever
> running, and looking in /etc/preremove, ~~bash.sh.done was never
> created. Does the preremove logic in setup.exe depend on the script
> having the same name as the package that is being removed? If so,
> then ~~bash.sh will never be run, it would have to be named
> bash.sh. But changing the name would be problematic because the
> preremove script attempts to remove /bin/sh, which would invalidate
> all subsequent preremove scripts. This needs to be one of the things
> looked at before the next setup.exe is released.
I'm afraid you're right. The code from Installer::preremoveOne in
try_run_script ("/etc/preremove/", pkg.name);
which essentially runs "/etc/preremove/PKGNAME.sh" and
"/etc/preremove/PKGNAME.bat". As I understand, we currently have no way
of associating a preremove script with the package that contains it other
than by name.
I guess this is a <http://cygwin.com/acronyms/#PTC> situation.
FYI, the preremove scripts are not currently run in alphabetical order,
but rather in the order that the packages are removed, so the naming may
not be the right solution anyway.
|\ _,,,---,,_ firstname.lastname@example.org
ZZZzz /,`.-'`' -. ;-;;,_ email@example.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT