gnetlist bom trips on missing attrib file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gEDA |
Fix Released
|
Medium
|
Jared Casper |
Bug Description
(as reported to geda-user by Girvin R. Herr)
If there is no attribs file around, the backends bom and bom2 crash with an irritating error message on the command line:
/------
$gnetlist -g bom xx.sch
Loading schematic
[/home/
Backtrace:
In current input:
1: 0* [bom "output.net"]
In /usr/local/
37: 1 (let ((port #) (attriblist #)) (bom:printlist (cons #
attriblist) port) ...)
40: 2* [bom:parseconfig ...
40: 3* [open-input-file "attribs"]
In unknown file:
?: 4 [open-file "attribs" "r"]
<unnamed port>: In procedure open-file in expression (open-file str
OPEN_READ):
<unnamed port>: No such file or directory: "attribs"
\------
Suggestions:
1) Check for the existence of the attribs file.
2a) Issue a newbie friendly message, if not.
2b) produce a sensible default attribs file on the fly.
3) accept a file name on the command line, so you can have different attribs files for the same project
4) accept a string on the command line to replace the contents of the attribs file
---<)kaimartin(>---
Changed in geda: | |
status: | Fix Committed → Fix Released |
Attached patch implements all of the suggestions except for 2b. 2b wouldn't be hard to implement but I think any "sensible default" would be debatable.
Comments/ suggestions welcome.