~ubuntu-branches/ubuntu/oneiric/language-selector/oneiric

« back to all changes in this revision

Viewing changes to LanguageSelector/LanguageSelector.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-26 11:41:04 UTC
  • Revision ID: james.westby@ubuntu.com-20110526114104-yrxyuauhrcbm59ae
Tags: 0.38
* LanguageSelector/CheckLanguageSupport.py, LanguageSelector/LangCache.py:
  Allow pkg_depends to do language/locale suffix patterns for writing aids
  ('wa') as well. This will make it a lot easier and robust to add hyphen-*,
  mythes-* and friends.
* data/pkg_depends: Replace per-language mythes-*/hyphen-* lists with a
  pattern.
* LanguageSelector/CheckLanguageSupport.py, LanguageSelector/LangCache.py:
  Support empty dependencies, in which case install the package
  unconditionally for this language.
* LanguageSelector/CheckLanguageSupport.py, LanguageSelector/LangCache.py:
  Implement missing handling of fonts ("fn:") and input support ("im:") in
  pkg_depends.
* data/pkg_depends: Add all remaining dependencies which we previously
  carried in language-support-* (which will go away).
* data/blacklist: Remove all packages, none of them exist any more.
* Remove language-support-* handling, they will go away in oneiric.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
                           self._cache[translation].marked_delete) and \
73
73
                           not translation in missing):
74
74
                            missing.append(translation)
75
 
            trans_package = "language-support-writing-%s" % langInfo.languageCode
76
 
            # we have a langsupport-writing installed, see if we have all of them
77
 
            if (trans_package in self._cache and 
78
 
               (self._cache[trans_package].is_installed or \
79
 
               self._cache[trans_package].marked_install or \
80
 
               self._cache[trans_package].marked_upgrade)):
81
 
                #print "IsInstalled: %s " % trans_package
82
 
                #print self._cache.pkg_writing[langInfo.languageCode]
83
 
                if langInfo.languageCode in self._cache.pkg_writing:
84
 
                    for (pkg, pull_pkg) in self._cache.pkg_writing[langInfo.languageCode]:
85
 
                        if '|' in pkg:
86
 
                            # multiple dependencies, if one of them is installed, pull the pull_pkg
87
 
                            for p in pkg.split('|'):
88
 
                                if self._cache[p] and \
89
 
                                   (self._cache[p].is_installed or \
90
 
                                   self._cache[p].marked_install or \
91
 
                                   self._cache[p].marked_upgrade) and \
92
 
                                   not self._cache[p].marked_delete and \
93
 
                                   pull_pkg in self._cache and \
94
 
                                   ((not self._cache[pull_pkg].is_installed and \
95
 
                                   not self._cache[pull_pkg].marked_install and \
96
 
                                   not self._cache[pull_pkg].marked_upgrade) or \
97
 
                                   self._cache[pull_pkg].marked_delete) and \
98
 
                                   not pull_pkg in missing:
99
 
                                    missing.append(pull_pkg)
100
 
                        else:
101
 
                            if pkg in self._cache and \
102
 
                               (self._cache[pkg].is_installed or \
103
 
                               self._cache[pkg].marked_install or \
104
 
                               self._cache[pkg].marked_upgrade) and \
105
 
                               not self._cache[pkg].marked_delete and \
106
 
                               pull_pkg in self._cache and \
107
 
                               ((not self._cache[pull_pkg].is_installed and \
108
 
                               not self._cache[pull_pkg].marked_install and \
109
 
                               not self._cache[pull_pkg].marked_upgrade) or \
110
 
                               self._cache[pull_pkg].marked_delete) and \
111
 
                               not pull_pkg in missing:
112
 
                                missing.append(pull_pkg)
113
75
 
114
76
        # now check for a missing default language support
115
77
        default_lang = self._localeinfo.getSystemDefaultLanguage()[0]