[Home]

Summary:ASTERISK-12653: [patch] Prompt for immediate removal of modules not installed by current version of Asterisk
Reporter:Mark Michelson (mmichelson)Labels:
Date Opened:2008-08-27 17:06:11Date Closed:2008-10-14 16:24:39
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 13388.patch
Description:When switching versions of Asterisk, you will likely have old modules built from a previous installation. I typically will just blow away my modules directory and then re-run `make install` after.

seanbright on #asterisk-dev brought up the idea of prompting for removal of modules at installation time, so I made a slight change to the Makefile to do this.

Since my shell-scripting skills don't even come near my C skills, I am putting this on the bugtracker for review and suggestions for improvements.

Here are some of the design decisions explained:
* No input indicates to remove the modules. I did this since it is the most
  likely choice.
* [yY]* is the only other input that will remove modules. As qwell pointed out
  to me, this way, if someone accidentally types 'm' instead of 'n' to indicate
  they don't wish to delete the modules, then it won't cause a problem. Of
  course, this also means that inputs like "yellow" and "YOW" will cause
  removal of files
* I used the -i flag for rm so that a user could choose to keep certain modules
  available, such as valid third-party modules.
Comments:By: Leif Madsen (lmadsen) 2008-08-27 18:13:51

A patch has been attached and is ready for review, so I am changing this to confirmed.

By: Jared Smith (jsmith) 2008-08-27 18:52:18

My only concern here is that it has the potential of breaking automated build systems... we already warn the user about modules that weren't built as part of this build -- do we really need to hold their hand and prompt them to delete them?  Should this only be for dev-mode?

By: Sean Bright (seanbright) 2008-08-27 21:07:50

For me, when I see those warnings, I end up deleting all the contents of /usr/lib/asterisk/modules and running 'make install' again, so this would just save me the trouble of doing something I would do manually anyway.

I agree that it is problematic for automated builds.  Not sure there is an elegant way around that.

By: Mark Michelson (mmichelson) 2008-08-28 10:16:20

jsmith: Definitely a good point regarding automated builds. I don't feel like we really need to hold the user's hand through the module removal process, but anything that could make things easier is a good thing to me.

If this patch seems like a just plain bad idea, don't hold back. It's not going to hurt my feelings any if this gets rejected.

By: Mark Michelson (mmichelson) 2008-10-14 16:24:35

I'm just going to close this. There's not much activity here on this issue and I have a feeling that most people just don't care enough to have this be a regular part of the installation process.