The mailing list thread on this discussion has died-out, so I am reviving the issue here.
Webmin uses 'apt-get -y install' to upgrade packages. This approach causes problems relating to package dependencies.
For example, whenever I upgrade the apache2 package, libapache2-mod-php5 is removed in the process and never reinstalled. This causes Apache to fail to start after the upgrade (due to syntax errors resulting from libapache2-mod-php5's absence). I have to reinstall libapache2-mod-php5 manually every time.
Initially, I thought that this was a problem with Ubuntu's apache2 package, and I opened a ticket ( https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/969426 ), but the folks at Ubuntu clarified the issue and explained why 'apt-get -y install' is not the right approach to upgrading packages.
Screenshot denoting possible Dry-Run Only checkbox
As discussed on the mailing list, it seems that adding a "Dry-Run Only" checkbox to the Update Packages module interface would be a powerful addition to Webmin. Please see attached screenshot for possible placement.
So unless there is some way to upgrade a single package other than apt-get install , I'm not willing to switch to using "apt-get upgrade". Admins typically want the flexibility to do selective upgrades, not update the whole system at once.
I agree completely; the ability to update packages selectively is an absolute must.
Consider the fact that Ubuntu provides for this functionality in its graphical utility, Update Manager. How is this accomplished? I don't know. I have asked this question in the Ubuntu bug tracker thread at https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/969426 . Hopefully one of the developers will respond. I don't know whether the Update Manager "exploits" apt-get in some way (e.g., by manipulating its configuration with apt_preferences) or uses a different utility (that is, not apt-get) altogether.
In any event, it seems possible to achieve the desired behavior.
If and until the package upgrading mechanism is improved to avoid the pitfall I've outlined, adding the "Dry Run Only" checkbox seems worthwhile.
Thanks, Jamie!
If debian's developers explain a proper way of doing this, please let me know and I will update Webmin to use it.
What about adding the --no-remove option?
From the man page: "If any packages are to be removed apt-get immediately aborts without prompting. Configuration Item: APT::Get::Remove."
It's probably better to have a package not update than to have it update and remove something else.
That could be used .. but wouldn't it break the case where an update legitimately needs to replace one dependency with another?
I also have had this problem a number of times. Coming back after a weekend, to find that mod_fastcgid has been removed, in favor of mod_php (for example), is a serious concern.
As a workaround, I created a script. this script checks to see if package X is installed, and if not, simply reinstall it. so if mod_fastcgid gets removed during a package update... every hour, it checks for its existence, and replaced mod_php with mod_fastcgid.
could something like this be done for essential packages used by webmin? I realize that this isn't really a fix for the issue, but only a hack. but currently, the latter seems much more undersireable.
Automatically re-installing missing packages would be tough to add to Webmin, as the list depends heavily on the distro, version and purpose of the system.
right. never thought about that. it was pretty late when i found this post XD. sorry about that.