[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Free Dog meeting report: Notes on the topics we discussed



Ales Hvezda wrote:
Hi Stuart, Dan, and all,

[snip]

I think the real issue is you may have geda installed libs which grow over time, company-wide libs which grow over time, per-user libs, per-project libs, etc. and sooner or later there will be a name clash. Hopefully the rule of pick your project libs first then company libs, then geda libs is usually correct, but it may not always be.


	I had a crazy idea today which may solve this problem, but I would
like some opinions before I run off and do something drastic. :)

Just so summarize the problem, basically:

* two symbol files, * both identically named with slightly different contents, * both in different component libraries,
* and this symbol is instanciated on a schematic.


	UserA might pickup symbol.sym from local/ while UserB might pick
up the second symbol.sym from rf/.

	This problem is really caused by libgeda not storing the
library name in the schematic files.  I don't really want to put the
library name into the schematic because then the schematic becomes
component library layout/naming/etc... dependent.  Note, the existing
symversion= mechanism will not solve this problem, since the default
for all symbols is 0.0 and both symbols will have this default version.

	However, what if libgeda stored a cryptographic signature/hash of
the symbol file contents along with the filename in the schematics?
The signature can be something along the lines of an md5sum string (maybe
not so long, but long to uniquely identify the contents).  When a symbol
is loaded from disk, the signatures are compared and if they don't match,
a warning is issued.  Sorta like the existing symversion= mechanism,
but now it will not be possible for symbol changes to escape notice
from the designers.  And should there be a valid symbol change, then the
component is simply updated using Edit/Update Component.

	Now back to the original problem: two symbols identically named
symbols will most likely not have identical signatures/hashes and it
would be impossible for the wrong symbol to be silently netlisted.

Comments on this idea?

1) can you make it so that if you have 4 superchip-1.sym's in your search path, you check the hash on all 4 before declaring you can't find the original symbol? That would fix the issue with a symbol being duplicated in name in 2 libs.


2) in fact, could you do a lookup by symbol file name _or_ by hash and be able to locate a symbol by hash even if it had been renamed?

3) It might be nice in general to be able to query something in the schematic and have it tell you what file (complete path) or library it resides in.

4)  I haven't used hierarchy with gEDA.  Any issues to consider here?

I need to sleep on it some, but I think if you can do #1 and #2 here I'd be most happy and consider the problem solved. In fact I think it probably solves it better than the library:symbol approach.

-Dan