[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: Mangling schematics
>
> I didn't have gafrc or gattrc or what is necessary set up and used gattrib
> to mass-add some attributes.
>
> Result was that all local symbols were removed and then when I loaded it into
> gschem (which had the paths set up correctly) I was wondering why they were
> missing.
You *need* to have either a gafrc or gattribrc file with all paths to
your symbols to use this program. Otherwise, it will nuke your
symbols & you might not notice until it is too late. This is a
problem in libgeda (although gattrib makes it much worse than
other programs, so mea culpa). Ales & I have talked about this.
If you don't have a path to the symbol files specified in an RC file,
then the read-in stuff in libgeda (o_read, o_complex_read and so on)
will not place a reference to your symbol files in the object linked
list which is the central data structure in libgeda. Then, upon
saving it saves out a schematic without any references to the symbol
files.
The missing symbol behavior is readily apparent when you run gschem
because the symbols don't appear. IN this case, you just leave
gschem, fix the RC (because you notice the problem), and then re-open
gschem & all is well.
In the case of gattrib, if you don't run it with an RC file set
correctly, then it opens up your design and shows you all your
attributes. It can do this because the editable attributes are stored
in the schematic file, and not in the symbol. However, it has nuked
all references to your symbols behind your back. It does warn you,
but I agree that the warnings are easy to miss if you don't know what
is going on. Then, when you save out your design, it is trashed.
THis is one big reason why we started to move to a gaf-wide RC file
mechanism. The idea is that if you have one RC file for everything,
then stuff like this won't happen becaue a good config for one tool
will be automatically used for the other tools too. It also helps
eliminate problems like this when one tool uses one symbol search
path, and another tool uses a different search path. (Not likely, but
completely possible -- kind of like running gattrib without an RC
file.)
BTW: the program does warn you that it is killing your symbols, but I
agree that it can be easy to miss that since the warning appears on
the TTY along with a bunch of other unimportant warnings.
> Isn't it possible to change gattrib's behaviour somehow to prevent this?
Yes, I agree that it must be fixed ASAP. Thank you for your bug
report.
In the meanwhile, please configure your system properly! :-) If you
are running 20041228, then use system-gafrc in your shared/gEDA
directory, otherwise create a system-gattribrc in your shared/gEDA
directory and make it a symlink to system/gschemrc.
Stuart