This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: Setup patch to keep test version if test version installed
- From: Achim Gratz <Stromeko at nexgo dot de>
- To: cygwin-apps at cygwin dot com
- Date: Thu, 05 Feb 2015 22:47:49 +0100
- Subject: Re: Setup patch to keep test version if test version installed
- Authentication-results: sourceware.org; auth=none
- References: <20150128202332 dot GF14265 at calimero dot vinschen dot de> <87d25yr2o1 dot fsf at Rainer dot invalid> <20150129094701 dot GK14265 at calimero dot vinschen dot de> <87iofp5wfu dot fsf at Rainer dot invalid> <20150130094251 dot GP14265 at calimero dot vinschen dot de> <87zj906pzq dot fsf at Rainer dot invalid> <20150202091726 dot GT14265 at calimero dot vinschen dot de> <20150205085749 dot GP2635 at calimero dot vinschen dot de> <87wq3whgc8 dot fsf at Rainer dot invalid> <20150205091958 dot GQ2635 at calimero dot vinschen dot de> <20150205094155 dot GR2635 at calimero dot vinschen dot de>
Corinna Vinschen writes:
> ...in other words, just drop the last three lines in your setup.hint,
> and the external-source hint.
Done.
I noticed just in time that the preremove scripts can't be dash scripts
at the moment.
Here's a patch to change that and also allow ".cmd" scripts, just like
already done for postinstall scripts:
install.cc: allow .dash and .cmd extensions for preremove scripts also
Modified install.cc
diff --git a/install.cc b/install.cc
index 60c248d..653d623 100644
--- a/install.cc
+++ b/install.cc
@@ -160,10 +160,12 @@ Installer::preremoveOne (packagemeta & pkg)
Progress.SetText1 ("Running preremove script...");
Progress.SetText2 (pkg.name.c_str());
Log (LOG_PLAIN) << "Running preremove script for " << pkg.name << endLog;
- try_run_script ("/etc/preremove/", pkg.name, ".sh");
- try_run_script ("/etc/preremove/", pkg.name, ".bat");
+ const unsigned numexts = 4;
+ const char* exts[numexts] = { ".dash", ".sh", ".bat", ".cmd" };
+ for (unsigned i = 0; i < numexts; i++)
+ try_run_script ("/etc/preremove/", pkg.name, exts[i]);
}
void
Installer::uninstallOne (packagemeta & pkg)
{
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds