1
# kdelibs4to5_plugin.py - install kdelibs5-dev if kdeblibs4-dev is installed
2
# Copyright (C) 2009 Canonical, Ltd.
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.
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.
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/>.
17
import computerjanitor
18
_ = computerjanitor.setup_gettext()
21
class Kdelibs4devToKdelibs5devPlugin(computerjanitor.Plugin):
23
"""Plugin to install kdelibs5-dev if kdelibs4-dev is installed.
30
self.condition = ["from_hardyPostDistUpgradeCache"]
33
fromp = "kdelibs4-dev"
35
cache = self.app.apt_cache
36
if (fromp in cache and cache[fromp].is_installed and
37
top in cache and not cache[top].is_installed):
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."))