Univention Bugzilla – Bug 31662
second app center instance fails during app installation in first instance
Last modified: 2013-07-10 14:18:26 CEST
UCS 3.1-1 Errata 119 While installing Zarafa in one App Center, I started another App center module instance in the same browser/UMC which resultet in the following traceback: Die Ausführung des Kommandos appcenter/packages/sections ist fehlgeschlagen: Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute func( request ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 282, in _response result = _multi_response(self, request) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 384, in _response for res in function(self, iterator, *nones): File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 266, in _fake_func yield function(self, *args) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/__init__.py", line 293, in packages_sections for package in self.package_manager.packages(): File "/usr/lib/pymodules/python2.6/univention/lib/package_manager.py", line 478, in packages for pkg in self.cache: File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 173, in __iter__ yield self[pkgname] File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 161, in __getitem__ raise KeyError('The cache has no package named %r' % key) KeyError: "The cache has no package named 'libxss1'"
We could make sure that only one App Center tab is opened simultaneously (as in UCS@school computerroom). Would that be an option?
(In reply to Alexander Kläser from comment #1) > We could make sure that only one App Center tab is opened simultaneously (as > in UCS@school computerroom). Would that be an option? yes, no concerns on my side.
Fixed in univention-management-console-module-appcenter 2.0.139-14.143.201306281536 and univention-management-console-module-appcenter 3.0.1-1.144.201306281606 YAML: 2013-06-28-univention-management-console-module-appcenter.yaml Changelog updated
As discussed, the problem seems to happen as appcenter/packages/section is accessing the same PackageManager instance which is installing the app. My guess would be that the iterator object is invalidated due to an cache update. Suggestion: appcenter/packages/section should open a separate apt.Cache instance to iterate over the packages and determine all sections. From my understanding, this will not interfere with the running PackageManager as the Cache is loaded completely into memory (I tested it with two different Cache instances and differing repositories).
(In reply to Alexander Kläser from comment #4) > Suggestion: appcenter/packages/section should open a separate apt.Cache Done in univention-management-console-module-appcenter 2.0.139-15.147.201307051308 and univention-management-console-module-appcenter 3.0.3-1.146.201307051305
I could not reproduce the traceback and the module can only be opened once now (→ see also Bug 31855). Erratum changes → OK YAML file → OK 3.2 changes → OK 3.2 changelog → FAIL, needs to be adapted
(In reply to Alexander Kläser from comment #6) > I could not reproduce the traceback and the module can only be opened once > now (→ see also Bug 31855). > > Erratum changes → OK > YAML file → OK > 3.2 changes → OK > 3.2 changelog → FAIL, needs to be adapted I adapted the changelog entry.
http://errata.univention.de/ucs/3.1/146.html