gconf_resource throws an exception if gconftool-2 is not found
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
Medium
|
Brendan Donegan | ||
checkbox (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The following job defined in jobs/resource.txt fails with an exception on Oneiric server systems that don't have gconf2 installed:
name: gconf
plugin: resource
command: gconf_resource | filter_templates -w 'name=.*proxy.*'
If run through checkbox, this results in the following exception dump:
2011-08-22 11:39:39,180 INFO Running command: gconf_resource | filter_templates -w 'name=.*proxy.*'
2011-08-22 11:39:39,251 DEBUG Started firing message-result.
2011-08-22 11:39:39,251 DEBUG Calling /usr/share/
ol-2: not found
, 0.0698437690735) for message-result with priority 0.
2011-08-22 11:39:39,252 DEBUG Started firing message-file.
2011-08-22 11:39:39,252 DEBUG Calling /usr/share/
tance at 0x2c86998>) for message-file with priority 0.
2011-08-22 11:39:39,252 ERROR Error running event handler /usr/share/
Traceback (most recent call last):
File "/usr/lib/
results.
File "/usr/share/
messages = template.
File "/usr/lib/
elements = super(TemplateI18n, self).load_
File "/usr/lib/
% (filename, line)
Exception: Template <stream> parse error at: /bin/sh: gconftool-2: not found
Steps to reproduce:
On an Oneiric server system, which doesn't install gconf2 by default :
cd /usr/share/
./gconf_resource | ./filter_templates -w 'name=.*proxy.*'
Expected result:
A list of gconf name: and value: pairs
Actual result:
/bin/sh: gconftool-2: not found
Checkbox has problems parsing this, which results in the above error trace.
A possible solution would be to modify gconf_resource so that it outputs nothing if the command can't be run or found. An elegant solution would be to add a requires: package.name == 'gconf2' to the job definition, but requires (I think) aren't checked at this point during the gathering phase.
Related branches
- Marc Tardif (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedscripts/gconf_resource (+1/-1)
- Daniel Holbach (community): Needs Information
-
Diff: 8336 lines (+2048/-1194)32 files modifiedcheckbox/job.py (+9/-0)
checkbox/lib/transport.py (+26/-1)
checkbox/parsers/udev.py (+16/-4)
checkbox/report.py (+39/-12)
checkbox/tests/report.py (+1/-1)
checkbox/variables.py (+1/-1)
checkbox_gtk/gtk_interface.py (+6/-5)
checkbox_gtk/hyper_text_view.py (+3/-1)
data/whitelists/default.whitelist (+1/-0)
debian/changelog (+27/-0)
debian/control (+2/-2)
debian/po/it.po (+17/-9)
jobs/disk.txt.in (+1/-1)
jobs/info.txt.in (+9/-0)
jobs/mediacard.txt.in (+1/-1)
jobs/memory.txt.in (+2/-2)
jobs/monitor.txt.in (+1/-1)
jobs/suspend.txt.in (+2/-2)
plugins/intro_prompt.py (+2/-4)
plugins/jobs_prompt.py (+5/-0)
plugins/launchpad_prompt.py (+2/-2)
plugins/launchpad_report.py (+25/-18)
plugins/recover_prompt.py (+1/-2)
plugins/report_prompt.py (+7/-0)
plugins/suites_prompt.py (+2/-3)
po/es.po (+91/-92)
po/hu.po (+230/-209)
po/it.po (+588/-363)
po/zh_CN.po (+250/-233)
po/zh_TW.po (+147/-224)
report/hardware-1_0.rng (+533/-0)
scripts/gconf_resource (+1/-1)
Changed in checkbox: | |
assignee: | nobody → Canonical Hardware Certification (canonical-hw-cert) |
importance: | Undecided → Medium |
milestone: | none → 0.12.5 |
status: | New → Triaged |
Changed in checkbox: | |
milestone: | 0.12.5 → 0.12.6 |
Changed in checkbox: | |
status: | In Progress → Fix Committed |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |
Working on this - just getting setup to reproduce the problem now.