How does Ubuntu Update Manager upgrade packages selectively?

Discussion in 'Server Operation' started by cbj4074, Apr 9, 2012.

  1. cbj4074

    cbj4074 Member

    Hello,

    I ran into an issue recently whereby Webmin caused Apache to tank during what seemed to be a routine package upgrade.

    As it turns-out, Webmin uses 'apt-get install -y package-name', instead of 'apt-get upgrade', because the author is unaware of any means by which packages may be upgraded selectively using the latter command.

    The details of the issue are described here: https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/969426

    I scoured the relevant documentation for apt-get and indeed, the Webmin author is correct. There appears to be no facility for upgrading specific packages.

    My question to the community is, how does Ubuntu's Update Manager upgrade packages individually? The interface provides a checkbox for each proposed update, and the user is able to pick-and-choose.

    If anyone has any insight, it would be most appreciated.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You can upgrade packages like this:

    Code:
    apt-get install package1 package2 ...
    I'm not sure if this is the way Ubuntu's Update Manager does it...
     
  3. cbj4074

    cbj4074 Member

    Thank you for the reply, Falko. Much appreciated.

    Did you have a chance to look at the link that I cited in my initial post? There is a fundamental problem with using "install" over "upgrade". In short, with "install", there is the potential for packages to be removed and never reinstalled.

    In the case of Apache, using 'apt-get install -y apache2' will cause libapache2-mod-php5 to be removed (for reasons explained in the link above). Needless to say, when the package installation script attempts to start Apache after the upgrade (or installation, in this case), Apache fails to start due to the presence of Mod-PHP-specific configuration directives. The only way to reconcile the problem is to reinstall libapache2-mod-php5 manually.

    If any other ideas come to mind, I'd be grateful to hear them.
     

Share This Page