Merge lp:~dstansby-deactivatedaccount/language-selector/bugfix-lp-598619 into lp:language-selector
- bugfix-lp-598619
- Merge into ubuntu
Proposed by
David Stansby
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Sebastien Bacher | ||||
Proposed branch: | lp:~dstansby-deactivatedaccount/language-selector/bugfix-lp-598619 | ||||
Merge into: | lp:language-selector | ||||
Diff against target: |
443 lines (+104/-104) 3 files modified
LanguageSelector/CheckLanguageSupport.py (+27/-27) LanguageSelector/LangCache.py (+39/-39) LanguageSelector/LanguageSelector.py (+38/-38) |
||||
To merge this branch: | bzr merge lp:~dstansby-deactivatedaccount/language-selector/bugfix-lp-598619 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Core Development Team | Pending | ||
Review via email: mp+28585@code.launchpad.net |
Commit message
Description of the change
Fixed some deprecated variables
To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote : | # |
Unmerged revisions
- 371. By David Stansby
-
Fixed deprecated variables
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'LanguageSelector/CheckLanguageSupport.py' | |||
2 | --- LanguageSelector/CheckLanguageSupport.py 2010-05-26 14:40:53 +0000 | |||
3 | +++ LanguageSelector/CheckLanguageSupport.py 2010-06-27 09:34:31 +0000 | |||
4 | @@ -33,7 +33,7 @@ | |||
5 | 33 | for x in scanlist: | 33 | for x in scanlist: |
6 | 34 | pkg = '%s-%s' % (x, pkgcode) | 34 | pkg = '%s-%s' % (x, pkgcode) |
7 | 35 | if pkg in self._cache: | 35 | if pkg in self._cache: |
9 | 36 | if not self._cache[pkg].isInstalled and \ | 36 | if not self._cache[pkg].is_installed and \ |
10 | 37 | not self._cache[pkg].markedInstall: | 37 | not self._cache[pkg].markedInstall: |
11 | 38 | self.missing.add(pkg) | 38 | self.missing.add(pkg) |
12 | 39 | else: | 39 | else: |
13 | @@ -45,23 +45,23 @@ | |||
14 | 45 | if pkg in packages and \ | 45 | if pkg in packages and \ |
15 | 46 | pkg in self._cache and \ | 46 | pkg in self._cache and \ |
16 | 47 | translation in self._cache: | 47 | translation in self._cache: |
18 | 48 | if ((not self._cache[translation].isInstalled and \ | 48 | if ((not self._cache[translation].is_installed and \ |
19 | 49 | not self._cache[translation].markedInstall and \ | 49 | not self._cache[translation].markedInstall and \ |
22 | 50 | not self._cache[translation].markedUpgrade) or \ | 50 | not self._cache[translation].marked_marked_upgrade) or \ |
23 | 51 | self._cache[translation].markedDelete): | 51 | self._cache[translation].marked_delete): |
24 | 52 | self.missing.add(translation) | 52 | self.missing.add(translation) |
25 | 53 | else: | 53 | else: |
26 | 54 | self.installed.add(translation) | 54 | self.installed.add(translation) |
27 | 55 | else: | 55 | else: |
28 | 56 | if pkg in self._cache and \ | 56 | if pkg in self._cache and \ |
30 | 57 | (self._cache[pkg].isInstalled or \ | 57 | (self._cache[pkg].is_installed or \ |
31 | 58 | self._cache[pkg].markedInstall or \ | 58 | self._cache[pkg].markedInstall or \ |
33 | 59 | self._cache[pkg].markedUpgrade) and \ | 59 | self._cache[pkg].marked_marked_upgrade) and \ |
34 | 60 | translation in self._cache: | 60 | translation in self._cache: |
36 | 61 | if ((not self._cache[translation].isInstalled and \ | 61 | if ((not self._cache[translation].is_installed and \ |
37 | 62 | not self._cache[translation].markedInstall and \ | 62 | not self._cache[translation].markedInstall and \ |
40 | 63 | not self._cache[translation].markedUpgrade) or \ | 63 | not self._cache[translation].marked_marked_upgrade) or \ |
41 | 64 | self._cache[translation].markedDelete): | 64 | self._cache[translation].marked_delete): |
42 | 65 | self.missing.add(translation) | 65 | self.missing.add(translation) |
43 | 66 | else: | 66 | else: |
44 | 67 | self.installed.add(translation) | 67 | self.installed.add(translation) |
45 | @@ -69,7 +69,7 @@ | |||
46 | 69 | if pkgcode in self.pkg_writing and \ | 69 | if pkgcode in self.pkg_writing and \ |
47 | 70 | (pkgcode == self.system_pkgcode or \ | 70 | (pkgcode == self.system_pkgcode or \ |
48 | 71 | ('language-support-writing-%s' % pkgcode in self._cache and \ | 71 | ('language-support-writing-%s' % pkgcode in self._cache and \ |
50 | 72 | self._cache['language-support-writing-%s' % pkgcode].isInstalled) or \ | 72 | self._cache['language-support-writing-%s' % pkgcode].is_installed) or \ |
51 | 73 | ('language-support-writing-%s' % pkgcode in self._cache and \ | 73 | ('language-support-writing-%s' % pkgcode in self._cache and \ |
52 | 74 | self._cache['language-support-writing-%s' % pkgcode].markInstall) or \ | 74 | self._cache['language-support-writing-%s' % pkgcode].markInstall) or \ |
53 | 75 | ('language-support-writing-%s' % pkgcode in self._cache and \ | 75 | ('language-support-writing-%s' % pkgcode in self._cache and \ |
54 | @@ -82,24 +82,24 @@ | |||
55 | 82 | if p in packages and \ | 82 | if p in packages and \ |
56 | 83 | p in self._cache and \ | 83 | p in self._cache and \ |
57 | 84 | pull_pkg in self._cache: | 84 | pull_pkg in self._cache: |
59 | 85 | if ((not self._cache[pull_pkg].isInstalled and \ | 85 | if ((not self._cache[pull_pkg].is_installed and \ |
60 | 86 | not self._cache[pull_pkg].markedInstall and \ | 86 | not self._cache[pull_pkg].markedInstall and \ |
63 | 87 | not self._cache[pull_pkg].markedUpgrade) or \ | 87 | not self._cache[pull_pkg].marked_marked_upgrade) or \ |
64 | 88 | self._cache[pull_pkg].markedDelete): | 88 | self._cache[pull_pkg].marked_delete): |
65 | 89 | self.missing.add(pull_pkg) | 89 | self.missing.add(pull_pkg) |
66 | 90 | else: | 90 | else: |
67 | 91 | self.installed.add(pull_pkg) | 91 | self.installed.add(pull_pkg) |
68 | 92 | break | 92 | break |
69 | 93 | else: | 93 | else: |
70 | 94 | if p in self._cache and \ | 94 | if p in self._cache and \ |
72 | 95 | (self._cache[p].isInstalled or \ | 95 | (self._cache[p].is_installed or \ |
73 | 96 | self._cache[p].markedInstall or \ | 96 | self._cache[p].markedInstall or \ |
75 | 97 | self._cache[p].markedUpgrade) and \ | 97 | self._cache[p].marked_marked_upgrade) and \ |
76 | 98 | pull_pkg in self._cache: | 98 | pull_pkg in self._cache: |
78 | 99 | if ((not self._cache[pull_pkg].isInstalled and \ | 99 | if ((not self._cache[pull_pkg].is_installed and \ |
79 | 100 | not self._cache[pull_pkg].markedInstall and \ | 100 | not self._cache[pull_pkg].markedInstall and \ |
82 | 101 | not self._cache[pull_pkg].markedUpgrade) or \ | 101 | not self._cache[pull_pkg].marked_marked_upgrade) or \ |
83 | 102 | self._cache[pull_pkg].markedDelete): | 102 | self._cache[pull_pkg].marked_delete): |
84 | 103 | self.missing.add(pull_pkg) | 103 | self.missing.add(pull_pkg) |
85 | 104 | else: | 104 | else: |
86 | 105 | self.installed.add(pull_pkg) | 105 | self.installed.add(pull_pkg) |
87 | @@ -109,23 +109,23 @@ | |||
88 | 109 | if pkg in packages and \ | 109 | if pkg in packages and \ |
89 | 110 | pkg in self._cache and \ | 110 | pkg in self._cache and \ |
90 | 111 | pull_pkg in self._cache: | 111 | pull_pkg in self._cache: |
92 | 112 | if ((not self._cache[pull_pkg].isInstalled and \ | 112 | if ((not self._cache[pull_pkg].is_installed and \ |
93 | 113 | not self._cache[pull_pkg].markedInstall and \ | 113 | not self._cache[pull_pkg].markedInstall and \ |
96 | 114 | not self._cache[pull_pkg].markedUpgrade) or \ | 114 | not self._cache[pull_pkg].marked_marked_upgrade) or \ |
97 | 115 | self._cache[pull_pkg].markedDelete): | 115 | self._cache[pull_pkg].marked_delete): |
98 | 116 | self.missing.add(pull_pkg) | 116 | self.missing.add(pull_pkg) |
99 | 117 | else: | 117 | else: |
100 | 118 | self.installed.add(pull_pkg) | 118 | self.installed.add(pull_pkg) |
101 | 119 | else: | 119 | else: |
102 | 120 | if pkg in self._cache and \ | 120 | if pkg in self._cache and \ |
104 | 121 | (self._cache[pkg].isInstalled or \ | 121 | (self._cache[pkg].is_installed or \ |
105 | 122 | self._cache[pkg].markedInstall or \ | 122 | self._cache[pkg].markedInstall or \ |
107 | 123 | self._cache[pkg].markedUpgrade) and \ | 123 | self._cache[pkg].marked_marked_upgrade) and \ |
108 | 124 | pull_pkg in self._cache: | 124 | pull_pkg in self._cache: |
110 | 125 | if ((not self._cache[pull_pkg].isInstalled and \ | 125 | if ((not self._cache[pull_pkg].is_installed and \ |
111 | 126 | not self._cache[pull_pkg].markedInstall and \ | 126 | not self._cache[pull_pkg].markedInstall and \ |
114 | 127 | not self._cache[pull_pkg].markedUpgrade) or \ | 127 | not self._cache[pull_pkg].marked_marked_upgrade) or \ |
115 | 128 | self._cache[pull_pkg].markedDelete): | 128 | self._cache[pull_pkg].marked_delete): |
116 | 129 | self.missing.add(pull_pkg) | 129 | self.missing.add(pull_pkg) |
117 | 130 | else: | 130 | else: |
118 | 131 | self.installed.add(pull_pkg) | 131 | self.installed.add(pull_pkg) |
119 | @@ -295,7 +295,7 @@ | |||
120 | 295 | not item.startswith('language-pack-gnome') and \ | 295 | not item.startswith('language-pack-gnome') and \ |
121 | 296 | not item.startswith('language-pack-kde') and \ | 296 | not item.startswith('language-pack-kde') and \ |
122 | 297 | not item.endswith('-base') and \ | 297 | not item.endswith('-base') and \ |
124 | 298 | (self._cache[item].isInstalled or \ | 298 | (self._cache[item].is_installed or \ |
125 | 299 | self._cache[item].markedInstall): | 299 | self._cache[item].markedInstall): |
126 | 300 | pkgcode = item.replace('language-pack-', '') | 300 | pkgcode = item.replace('language-pack-', '') |
127 | 301 | pkgcodes.append(pkgcode) | 301 | pkgcodes.append(pkgcode) |
128 | 302 | 302 | ||
129 | === modified file 'LanguageSelector/LangCache.py' | |||
130 | --- LanguageSelector/LangCache.py 2010-05-28 10:42:08 +0000 | |||
131 | +++ LanguageSelector/LangCache.py 2010-06-27 09:34:31 +0000 | |||
132 | @@ -39,7 +39,7 @@ | |||
133 | 39 | pkgname = langpkg_status.pkgname_template % languageCode | 39 | pkgname = langpkg_status.pkgname_template % languageCode |
134 | 40 | langpkg_status.available = pkgname in cache | 40 | langpkg_status.available = pkgname in cache |
135 | 41 | if langpkg_status.available: | 41 | if langpkg_status.available: |
137 | 42 | langpkg_status.installed = cache[pkgname].isInstalled | 42 | langpkg_status.installed = cache[pkgname].is_installed |
138 | 43 | 43 | ||
139 | 44 | @property | 44 | @property |
140 | 45 | def inconsistent(self): | 45 | def inconsistent(self): |
141 | @@ -81,7 +81,7 @@ | |||
142 | 81 | 81 | ||
143 | 82 | def __init__(self, localeinfo, progress): | 82 | def __init__(self, localeinfo, progress): |
144 | 83 | apt.Cache.__init__(self, progress) | 83 | apt.Cache.__init__(self, progress) |
146 | 84 | if self._depcache.BrokenCount > 0: | 84 | if self._depcache.broken_count > 0: |
147 | 85 | raise ExceptionPkgCacheBroken() | 85 | raise ExceptionPkgCacheBroken() |
148 | 86 | self._localeinfo = localeinfo | 86 | self._localeinfo = localeinfo |
149 | 87 | # keep the lists | 87 | # keep the lists |
150 | @@ -190,15 +190,15 @@ | |||
151 | 190 | @property | 190 | @property |
152 | 191 | def havePackageLists(self): | 191 | def havePackageLists(self): |
153 | 192 | " verify that a network package lists exists " | 192 | " verify that a network package lists exists " |
163 | 193 | for metaindex in self._list.List: | 193 | for metaindex in self._list.list: |
164 | 194 | for indexfile in metaindex.IndexFiles: | 194 | for indexfile in metaindex.index_files: |
165 | 195 | if indexfile.ArchiveURI("").startswith("cdrom:"): | 195 | if indexfile.archive_uri("").startswith("cdrom:"): |
166 | 196 | continue | 196 | continue |
167 | 197 | if indexfile.ArchiveURI("").startswith("http://security.ubuntu.com"): | 197 | if indexfile.archive_uri("").startswith("http://security.ubuntu.com"): |
168 | 198 | continue | 198 | continue |
169 | 199 | if indexfile.Label != "Debian Package Index": | 199 | if indexfile.label != "Debian Package Index": |
170 | 200 | continue | 200 | continue |
171 | 201 | if indexfile.Exists and indexfile.HasPackages: | 201 | if indexfile.exists and indexfile.has_packageiss: |
172 | 202 | return True | 202 | return True |
173 | 203 | return False | 203 | return False |
174 | 204 | 204 | ||
175 | @@ -218,9 +218,9 @@ | |||
176 | 218 | to_inst = [] | 218 | to_inst = [] |
177 | 219 | to_rm = [] | 219 | to_rm = [] |
178 | 220 | for pkg in self.getChanges(): | 220 | for pkg in self.getChanges(): |
180 | 221 | if pkg.markedInstall or pkg.markedUpgrade: | 221 | if pkg.markedInstall or pkg.marked_marked_upgrade: |
181 | 222 | to_inst.append(pkg.name) | 222 | to_inst.append(pkg.name) |
183 | 223 | if pkg.markedDelete: | 223 | if pkg.marked_delete: |
184 | 224 | to_rm.append(pkg.name) | 224 | to_rm.append(pkg.name) |
185 | 225 | return (to_inst,to_rm) | 225 | return (to_inst,to_rm) |
186 | 226 | 226 | ||
187 | @@ -233,7 +233,7 @@ | |||
188 | 233 | "language-pack-%s"%languageCode] | 233 | "language-pack-%s"%languageCode] |
189 | 234 | # see what additional pkgs are needed | 234 | # see what additional pkgs are needed |
190 | 235 | #for (pkg, translation) in self.pkg_translations[languageCode]: | 235 | #for (pkg, translation) in self.pkg_translations[languageCode]: |
192 | 236 | # if pkg in self and self[pkg].isInstalled: | 236 | # if pkg in self and self[pkg].is_installed: |
193 | 237 | # pkg_list.append(translation) | 237 | # pkg_list.append(translation) |
194 | 238 | return pkg_list | 238 | return pkg_list |
195 | 239 | 239 | ||
196 | @@ -266,22 +266,22 @@ | |||
197 | 266 | if lang_pack_status.available and not lang_pack_status.installed: | 266 | if lang_pack_status.available and not lang_pack_status.installed: |
198 | 267 | for (pkg, translation) in self.pkg_translations[lang_pack_status.languageCode]: | 267 | for (pkg, translation) in self.pkg_translations[lang_pack_status.languageCode]: |
199 | 268 | if pkg in self and \ | 268 | if pkg in self and \ |
201 | 269 | (self[pkg].isInstalled or \ | 269 | (self[pkg].is_installed or \ |
202 | 270 | self[pkg].markedInstall or \ | 270 | self[pkg].markedInstall or \ |
204 | 271 | self[pkg].markedUpgrade) and \ | 271 | self[pkg].marked_marked_upgrade) and \ |
205 | 272 | translation in self and \ | 272 | translation in self and \ |
207 | 273 | ((not self[translation].isInstalled and \ | 273 | ((not self[translation].is_installed and \ |
208 | 274 | not self[translation].markedInstall and \ | 274 | not self[translation].markedInstall and \ |
211 | 275 | not self[translation].markedUpgrade) or \ | 275 | not self[translation].marked_marked_upgrade) or \ |
212 | 276 | self[translation].markedDelete): | 276 | self[translation].marked_delete): |
213 | 277 | self[translation].markInstall() | 277 | self[translation].markInstall() |
214 | 278 | #print ("Will pull: %s" % translation) | 278 | #print ("Will pull: %s" % translation) |
215 | 279 | elif lang_pack_status.installed: | 279 | elif lang_pack_status.installed: |
216 | 280 | for (pkg, translation) in self.pkg_translations[lang_pack_status.languageCode]: | 280 | for (pkg, translation) in self.pkg_translations[lang_pack_status.languageCode]: |
217 | 281 | if translation in self and \ | 281 | if translation in self and \ |
219 | 282 | (self[translation].isInstalled or \ | 282 | (self[translation].is_installed or \ |
220 | 283 | self[translation].markedInstall or \ | 283 | self[translation].markedInstall or \ |
222 | 284 | self[translation].markedUpgrade): | 284 | self[translation].marked_marked_upgrade): |
223 | 285 | self[translation].markDelete() | 285 | self[translation].markDelete() |
224 | 286 | #print ("Will remove: %s" % translation) | 286 | #print ("Will remove: %s" % translation) |
225 | 287 | 287 | ||
226 | @@ -296,24 +296,24 @@ | |||
227 | 296 | # multiple dependencies, if one of them is installed, pull the pull_pkg | 296 | # multiple dependencies, if one of them is installed, pull the pull_pkg |
228 | 297 | for p in pkg.split('|'): | 297 | for p in pkg.split('|'): |
229 | 298 | if p in self and \ | 298 | if p in self and \ |
231 | 299 | (self[p].isInstalled or \ | 299 | (self[p].is_installed or \ |
232 | 300 | self[p].markedInstall or \ | 300 | self[p].markedInstall or \ |
235 | 301 | self[p].markedUpgrade) and \ | 301 | self[p].marked_marked_upgrade) and \ |
236 | 302 | ((not self[pull_pkg].isInstalled and \ | 302 | ((not self[pull_pkg].is_installed and \ |
237 | 303 | not self[pull_pkg].markedInstall and \ | 303 | not self[pull_pkg].markedInstall and \ |
240 | 304 | not self[pull_pkg].markedUpgrade) or \ | 304 | not self[pull_pkg].marked_marked_upgrade) or \ |
241 | 305 | self[pull_pkg].markedDelete): | 305 | self[pull_pkg].marked_delete): |
242 | 306 | self[pull_pkg].markInstall() | 306 | self[pull_pkg].markInstall() |
243 | 307 | #print ("Will pull: %s" % pull_pkg) | 307 | #print ("Will pull: %s" % pull_pkg) |
244 | 308 | else: | 308 | else: |
245 | 309 | if pkg in self and \ | 309 | if pkg in self and \ |
247 | 310 | (self[pkg].isInstalled or \ | 310 | (self[pkg].is_installed or \ |
248 | 311 | self[pkg].markedInstall or \ | 311 | self[pkg].markedInstall or \ |
251 | 312 | self[pkg].markedUpgrade) and \ | 312 | self[pkg].marked_marked_upgrade) and \ |
252 | 313 | ((not self[pull_pkg].isInstalled and \ | 313 | ((not self[pull_pkg].is_installed and \ |
253 | 314 | not self[pull_pkg].markedInstall and \ | 314 | not self[pull_pkg].markedInstall and \ |
256 | 315 | not self[pull_pkg].markedUpgrade) or \ | 315 | not self[pull_pkg].marked_marked_upgrade) or \ |
257 | 316 | self[pull_pkg].markedDelete): | 316 | self[pull_pkg].marked_delete): |
258 | 317 | self[pull_pkg].markInstall() | 317 | self[pull_pkg].markInstall() |
259 | 318 | #print ("Will pull: %s" % pull_pkg) | 318 | #print ("Will pull: %s" % pull_pkg) |
260 | 319 | elif writing_aid_status.installed and writing_aid_status.doChange: | 319 | elif writing_aid_status.installed and writing_aid_status.doChange: |
261 | @@ -328,25 +328,25 @@ | |||
262 | 328 | for l in self.multilang[pull_pkg]: | 328 | for l in self.multilang[pull_pkg]: |
263 | 329 | p = "language-support-writing-%s" % l | 329 | p = "language-support-writing-%s" % l |
264 | 330 | if p in self and \ | 330 | if p in self and \ |
266 | 331 | (self[p].isInstalled or \ | 331 | (self[p].is_installed or \ |
267 | 332 | self[p].markedInstall or \ | 332 | self[p].markedInstall or \ |
270 | 333 | self[p].markedUpgrade) and \ | 333 | self[p].marked_marked_upgrade) and \ |
271 | 334 | not self[p].markedDelete: | 334 | not self[p].marked_delete: |
272 | 335 | lcount = lcount+1 | 335 | lcount = lcount+1 |
273 | 336 | if '|' in pkg: | 336 | if '|' in pkg: |
274 | 337 | # multiple dependencies, if at least one of them is installed, keep the pull_pkg | 337 | # multiple dependencies, if at least one of them is installed, keep the pull_pkg |
275 | 338 | # only remove pull_pkg if none of the dependencies are installed anymore | 338 | # only remove pull_pkg if none of the dependencies are installed anymore |
276 | 339 | for p in pkg.split('|'): | 339 | for p in pkg.split('|'): |
277 | 340 | if p in self and \ | 340 | if p in self and \ |
279 | 341 | (self[p].isInstalled or \ | 341 | (self[p].is_installed or \ |
280 | 342 | self[p].markedInstall or \ | 342 | self[p].markedInstall or \ |
283 | 343 | self[p].markedUpgrade) and \ | 343 | self[p].marked_marked_upgrade) and \ |
284 | 344 | not self[p].markedDelete: | 344 | not self[p].marked_delete: |
285 | 345 | pcount = pcount+1 | 345 | pcount = pcount+1 |
286 | 346 | if pcount == 0 and lcount == 0 and \ | 346 | if pcount == 0 and lcount == 0 and \ |
288 | 347 | (self[pull_pkg].isInstalled or \ | 347 | (self[pull_pkg].is_installed or \ |
289 | 348 | self[pull_pkg].markedInstall or \ | 348 | self[pull_pkg].markedInstall or \ |
291 | 349 | self[pull_pkg].markedUpgrade): | 349 | self[pull_pkg].marked_marked_upgrade): |
292 | 350 | self[pull_pkg].markDelete() | 350 | self[pull_pkg].markDelete() |
293 | 351 | #print ("Will remove: %s" % pull_pkg) | 351 | #print ("Will remove: %s" % pull_pkg) |
294 | 352 | 352 | ||
295 | 353 | 353 | ||
296 | === modified file 'LanguageSelector/LanguageSelector.py' | |||
297 | --- LanguageSelector/LanguageSelector.py 2010-05-27 08:12:43 +0000 | |||
298 | +++ LanguageSelector/LanguageSelector.py 2010-06-27 09:34:31 +0000 | |||
299 | @@ -52,32 +52,32 @@ | |||
300 | 52 | trans_package = "language-pack-%s" % langInfo.languageCode | 52 | trans_package = "language-pack-%s" % langInfo.languageCode |
301 | 53 | # we have a langpack installed, see if we have all of them | 53 | # we have a langpack installed, see if we have all of them |
302 | 54 | if (trans_package in self._cache and \ | 54 | if (trans_package in self._cache and \ |
304 | 55 | (self._cache[trans_package].isInstalled or \ | 55 | (self._cache[trans_package].is_installed or \ |
305 | 56 | self._cache[trans_package].markedInstall or \ | 56 | self._cache[trans_package].markedInstall or \ |
308 | 57 | self._cache[trans_package].markedUpgrade) and \ | 57 | self._cache[trans_package].marked_marked_upgrade) and \ |
309 | 58 | not self._cache[trans_package].markedDelete): | 58 | not self._cache[trans_package].marked_delete): |
310 | 59 | #print "IsInstalled: %s " % trans_package | 59 | #print "IsInstalled: %s " % trans_package |
311 | 60 | #print self._cache.pkg_translations[langInfo.languageCode] | 60 | #print self._cache.pkg_translations[langInfo.languageCode] |
312 | 61 | if langInfo.languageCode in self._cache.pkg_translations: | 61 | if langInfo.languageCode in self._cache.pkg_translations: |
313 | 62 | for (pkg, translation) in self._cache.pkg_translations[langInfo.languageCode]: | 62 | for (pkg, translation) in self._cache.pkg_translations[langInfo.languageCode]: |
314 | 63 | if (pkg in self._cache and \ | 63 | if (pkg in self._cache and \ |
316 | 64 | (self._cache[pkg].isInstalled or \ | 64 | (self._cache[pkg].is_installed or \ |
317 | 65 | self._cache[pkg].markedInstall or \ | 65 | self._cache[pkg].markedInstall or \ |
320 | 66 | self._cache[pkg].markedUpgrade) and \ | 66 | self._cache[pkg].marked_marked_upgrade) and \ |
321 | 67 | not self._cache[pkg].markedDelete and \ | 67 | not self._cache[pkg].marked_delete and \ |
322 | 68 | translation in self._cache and \ | 68 | translation in self._cache and \ |
324 | 69 | ((not self._cache[translation].isInstalled and \ | 69 | ((not self._cache[translation].is_installed and \ |
325 | 70 | not self._cache[translation].markedInstall and \ | 70 | not self._cache[translation].markedInstall and \ |
328 | 71 | not self._cache[translation].markedUpgrade) or \ | 71 | not self._cache[translation].marked_marked_upgrade) or \ |
329 | 72 | self._cache[translation].markedDelete) and \ | 72 | self._cache[translation].marked_delete) and \ |
330 | 73 | not translation in missing): | 73 | not translation in missing): |
331 | 74 | missing.append(translation) | 74 | missing.append(translation) |
332 | 75 | trans_package = "language-support-writing-%s" % langInfo.languageCode | 75 | trans_package = "language-support-writing-%s" % langInfo.languageCode |
333 | 76 | # we have a langsupport-writing installed, see if we have all of them | 76 | # we have a langsupport-writing installed, see if we have all of them |
334 | 77 | if (trans_package in self._cache and | 77 | if (trans_package in self._cache and |
336 | 78 | (self._cache[trans_package].isInstalled or \ | 78 | (self._cache[trans_package].is_installed or \ |
337 | 79 | self._cache[trans_package].markedInstall or \ | 79 | self._cache[trans_package].markedInstall or \ |
339 | 80 | self._cache[trans_package].markedUpgrade)): | 80 | self._cache[trans_package].marked_marked_upgrade)): |
340 | 81 | #print "IsInstalled: %s " % trans_package | 81 | #print "IsInstalled: %s " % trans_package |
341 | 82 | #print self._cache.pkg_writing[langInfo.languageCode] | 82 | #print self._cache.pkg_writing[langInfo.languageCode] |
342 | 83 | if langInfo.languageCode in self._cache.pkg_writing: | 83 | if langInfo.languageCode in self._cache.pkg_writing: |
343 | @@ -86,28 +86,28 @@ | |||
344 | 86 | # multiple dependencies, if one of them is installed, pull the pull_pkg | 86 | # multiple dependencies, if one of them is installed, pull the pull_pkg |
345 | 87 | for p in pkg.split('|'): | 87 | for p in pkg.split('|'): |
346 | 88 | if self._cache[p] and \ | 88 | if self._cache[p] and \ |
348 | 89 | (self._cache[p].isInstalled or \ | 89 | (self._cache[p].is_installed or \ |
349 | 90 | self._cache[p].markedInstall or \ | 90 | self._cache[p].markedInstall or \ |
352 | 91 | self._cache[p].markedUpgrade) and \ | 91 | self._cache[p].marked_marked_upgrade) and \ |
353 | 92 | not self._cache[p].markedDelete and \ | 92 | not self._cache[p].marked_delete and \ |
354 | 93 | pull_pkg in self._cache and \ | 93 | pull_pkg in self._cache and \ |
356 | 94 | ((not self._cache[pull_pkg].isInstalled and \ | 94 | ((not self._cache[pull_pkg].is_installed and \ |
357 | 95 | not self._cache[pull_pkg].markedInstall and \ | 95 | not self._cache[pull_pkg].markedInstall and \ |
360 | 96 | not self._cache[pull_pkg].markedUpgrade) or \ | 96 | not self._cache[pull_pkg].marked_marked_upgrade) or \ |
361 | 97 | self._cache[pull_pkg].markedDelete) and \ | 97 | self._cache[pull_pkg].marked_delete) and \ |
362 | 98 | not pull_pkg in missing: | 98 | not pull_pkg in missing: |
363 | 99 | missing.append(pull_pkg) | 99 | missing.append(pull_pkg) |
364 | 100 | else: | 100 | else: |
365 | 101 | if pkg in self._cache and \ | 101 | if pkg in self._cache and \ |
367 | 102 | (self._cache[pkg].isInstalled or \ | 102 | (self._cache[pkg].is_installed or \ |
368 | 103 | self._cache[pkg].markedInstall or \ | 103 | self._cache[pkg].markedInstall or \ |
371 | 104 | self._cache[pkg].markedUpgrade) and \ | 104 | self._cache[pkg].marked_marked_upgrade) and \ |
372 | 105 | not self._cache[pkg].markedDelete and \ | 105 | not self._cache[pkg].marked_delete and \ |
373 | 106 | pull_pkg in self._cache and \ | 106 | pull_pkg in self._cache and \ |
375 | 107 | ((not self._cache[pull_pkg].isInstalled and \ | 107 | ((not self._cache[pull_pkg].is_installed and \ |
376 | 108 | not self._cache[pull_pkg].markedInstall and \ | 108 | not self._cache[pull_pkg].markedInstall and \ |
379 | 109 | not self._cache[pull_pkg].markedUpgrade) or \ | 109 | not self._cache[pull_pkg].marked_marked_upgrade) or \ |
380 | 110 | self._cache[pull_pkg].markedDelete) and \ | 110 | self._cache[pull_pkg].marked_delete) and \ |
381 | 111 | not pull_pkg in missing: | 111 | not pull_pkg in missing: |
382 | 112 | missing.append(pull_pkg) | 112 | missing.append(pull_pkg) |
383 | 113 | 113 | ||
384 | @@ -125,16 +125,16 @@ | |||
385 | 125 | # pkgcode = self._cache.langpack_locales[default_lang] | 125 | # pkgcode = self._cache.langpack_locales[default_lang] |
386 | 126 | trans_package = "language-pack-%s" % pkgcode | 126 | trans_package = "language-pack-%s" % pkgcode |
387 | 127 | if (trans_package in self._cache and | 127 | if (trans_package in self._cache and |
389 | 128 | not self._cache[trans_package].isInstalled): | 128 | not self._cache[trans_package].is_installed): |
390 | 129 | missing += [trans_package] | 129 | missing += [trans_package] |
391 | 130 | if pkgcode in self._cache.pkg_translations: | 130 | if pkgcode in self._cache.pkg_translations: |
392 | 131 | for (pkg, translation) in self._cache.pkg_translations[pkgcode]: | 131 | for (pkg, translation) in self._cache.pkg_translations[pkgcode]: |
394 | 132 | if (self._cache[pkg].isInstalled and not self._cache[translation].isInstalled): | 132 | if (self._cache[pkg].is_installed and not self._cache[translation].is_installed): |
395 | 133 | missing.append(translation) | 133 | missing.append(translation) |
396 | 134 | support_packages = LanguageSelectorPkgCache._getPkgList(self._cache, pkgcode) | 134 | support_packages = LanguageSelectorPkgCache._getPkgList(self._cache, pkgcode) |
397 | 135 | for support_package in support_packages: | 135 | for support_package in support_packages: |
398 | 136 | if (support_package in self._cache and | 136 | if (support_package in self._cache and |
400 | 137 | not self._cache[support_package].isInstalled): | 137 | not self._cache[support_package].is_installed): |
401 | 138 | missing.append(support_package) | 138 | missing.append(support_package) |
402 | 139 | 139 | ||
403 | 140 | if pkgcode in self._cache.pkg_writing: | 140 | if pkgcode in self._cache.pkg_writing: |
404 | @@ -143,28 +143,28 @@ | |||
405 | 143 | # multiple dependencies, if one of them is installed, pull the pull_pkg | 143 | # multiple dependencies, if one of them is installed, pull the pull_pkg |
406 | 144 | for p in pkg.split('|'): | 144 | for p in pkg.split('|'): |
407 | 145 | if self._cache[p] and \ | 145 | if self._cache[p] and \ |
409 | 146 | (self._cache[p].isInstalled or \ | 146 | (self._cache[p].is_installed or \ |
410 | 147 | self._cache[p].markedInstall or \ | 147 | self._cache[p].markedInstall or \ |
413 | 148 | self._cache[p].markedUpgrade) and \ | 148 | self._cache[p].marked_marked_upgrade) and \ |
414 | 149 | not self._cache[p].markedDelete and \ | 149 | not self._cache[p].marked_delete and \ |
415 | 150 | pull_pkg in self._cache and \ | 150 | pull_pkg in self._cache and \ |
417 | 151 | ((not self._cache[pull_pkg].isInstalled and \ | 151 | ((not self._cache[pull_pkg].is_installed and \ |
418 | 152 | not self._cache[pull_pkg].markedInstall and \ | 152 | not self._cache[pull_pkg].markedInstall and \ |
421 | 153 | not self._cache[pull_pkg].markedUpgrade) or \ | 153 | not self._cache[pull_pkg].marked_marked_upgrade) or \ |
422 | 154 | self._cache[pull_pkg].markedDelete) and \ | 154 | self._cache[pull_pkg].marked_delete) and \ |
423 | 155 | not pull_pkg in missing: | 155 | not pull_pkg in missing: |
424 | 156 | missing.append(pull_pkg) | 156 | missing.append(pull_pkg) |
425 | 157 | else: | 157 | else: |
426 | 158 | if pkg in self._cache and \ | 158 | if pkg in self._cache and \ |
428 | 159 | (self._cache[pkg].isInstalled or \ | 159 | (self._cache[pkg].is_installed or \ |
429 | 160 | self._cache[pkg].markedInstall or \ | 160 | self._cache[pkg].markedInstall or \ |
432 | 161 | self._cache[pkg].markedUpgrade) and \ | 161 | self._cache[pkg].marked_marked_upgrade) and \ |
433 | 162 | not self._cache[pkg].markedDelete and \ | 162 | not self._cache[pkg].marked_delete and \ |
434 | 163 | pull_pkg in self._cache and \ | 163 | pull_pkg in self._cache and \ |
436 | 164 | ((not self._cache[pull_pkg].isInstalled and \ | 164 | ((not self._cache[pull_pkg].is_installed and \ |
437 | 165 | not self._cache[pull_pkg].markedInstall and \ | 165 | not self._cache[pull_pkg].markedInstall and \ |
440 | 166 | not self._cache[pull_pkg].markedUpgrade) or \ | 166 | not self._cache[pull_pkg].marked_marked_upgrade) or \ |
441 | 167 | self._cache[pull_pkg].markedDelete) and \ | 167 | self._cache[pull_pkg].marked_delete) and \ |
442 | 168 | not pull_pkg in missing: | 168 | not pull_pkg in missing: |
443 | 169 | missing.append(pull_pkg) | 169 | missing.append(pull_pkg) |
444 | 170 | 170 |
Similar changes have landed in 0.6.1 so closing this merge request