Bug 29899 - Software management raises an error if package.candidate is None
Summary: Software management raises an error if package.candidate is None
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
Version: UCS 3.1
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 3.1-0-errata
Assignee: Dirk Wiesenthal
QA Contact: Stefan Gohmann
URL:
Keywords:
: 30097 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-02 10:18 CET by Dirk Wiesenthal
Modified: 2013-02-25 12:19 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2013-01-02 10:18:22 CET
Searching for packages' description raises an error for packages that cannot be found in any repository (e.g. a deb-file downloaded from somewhere and installed with dpkg). Those packages have to be skipped (if searching for something != "*" in description).

Die Ausführung des Kommandos appcenter/packages/query 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 176, in _response
    return function(self, 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 236, in packages_query
    elif key == 'description' and pattern.search(package.candidate.raw_description):
AttributeError: 'NoneType' object has no attribute 'raw_description'
Comment 1 Dirk Wiesenthal univentionstaff 2013-01-02 10:48:38 CET
- elif key == 'description' and pattern.search(package.candidate.raw_description):
+ elif key == 'description' and package.candidate and pattern.search(package.candidate.raw_description):
Comment 2 Dirk Wiesenthal univentionstaff 2013-01-04 15:21:48 CET
Fixed in
  univention-management-console-module-appcenter 2.0.94-1.44.201301041515
Comment 3 Dirk Wiesenthal univentionstaff 2013-01-08 20:12:19 CET
Extended the fix in
  univention-management-console-module-appcenter 2.0.95-1.45.201301082009

The module also raised an exception if a package without candidate was to be found in the grid (can happen without network connection)
Comment 4 Dirk Wiesenthal univentionstaff 2013-01-21 21:11:23 CET
*** Bug 30097 has been marked as a duplicate of this bug. ***
Comment 5 Dirk Wiesenthal univentionstaff 2013-01-24 21:40:42 CET
Shall be released as errata: backport from 3.1-1
Comment 6 Dirk Wiesenthal univentionstaff 2013-01-25 11:35:50 CET
Fixed in
  univention-management-console-module-appcenter 2.0.91-1.52.201301251129

for errata3.1-0
Comment 7 Stefan Gohmann univentionstaff 2013-02-06 08:07:17 CET
I can reproduce it when I install and reinstall a debian package which is not in the repository. With the new version it works in 3.1-1 and errata 3.1-0.

YAML + Changelog: OK
Comment 8 Moritz Muehlenhoff univentionstaff 2013-02-07 11:32:49 CET
http://errata.univention.de/3.1-errata33.html