home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / computerjanitor / plugins / kdelibs4to5_plugin.py < prev    next >
Encoding:
Python Source  |  2009-04-27  |  1.5 KB  |  42 lines

  1. # kdelibs4to5_plugin.py - install kdelibs5-dev if kdeblibs4-dev is installed
  2. # Copyright (C) 2009  Canonical, Ltd.
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, version 3 of the License.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  15.  
  16.  
  17. import computerjanitor
  18. _ = computerjanitor.setup_gettext()
  19.  
  20.  
  21. class Kdelibs4devToKdelibs5devPlugin(computerjanitor.Plugin):
  22.  
  23.     """Plugin to install kdelibs5-dev if kdelibs4-dev is installed.
  24.     
  25.     See also LP: #279621.
  26.     
  27.     """
  28.  
  29.     def __init__(self):
  30.         self.condition = ["from_hardyPostDistUpgradeCache"]
  31.  
  32.     def get_cruft(self):
  33.         fromp = "kdelibs4-dev"
  34.         top = "kdelibs5-dev"
  35.         cache = self.app.apt_cache
  36.         if (fromp in cache and cache[fromp].isInstalled and
  37.             top in cache and not cache[top].isInstalled):
  38.                 yield computerjanitor.MissingPackageCruft(cache[top],
  39.                         _("When upgrading, if kdelibs4-dev is installed, "
  40.                           "kdelibs5-dev needs to be installed. See "
  41.                           "bugs.launchpad.net, bug ##279621 for details."))
  42.