Mail Archives: geda-user/2021/04/17/10:45:58
Vladimir:
> On Sat, Apr 17, 2021 at 02:08:05PM +0200, karl AT aspodata DOT se [via geda-user AT delorie DOT com] wrote:
...
> > But for some projects it would be nice if I could start
> > lepton/geda an a clean plate.
> Lepton has the 'LEPTON_INHIBIT_RC_FILES' environment variable. It
> is of limited usage and may be dropped some day. If you would
> make it more clear what the 'clean plate' is in this case and how
> to support it, we could do better.
This is about libraries and the reset thing would probably suffice.
I a had a customer and they wanted all their symbols etc. to be
within the same repository (git in this case, but it could be
whatever), with no accidental use of any lib outside of that top
directory.
There was separate dirs for each subproject, a top .sch with source
symbols pointing to each subdirs "top" sch which was about one pcb each
but there could be multiple pcbs for each subdir. But you could traverse
the whole hierarchy starting from the top node, or a subtree starting
from some node (I could possible put in a "up" src symbol).
Now all thees should reference the same symbol library dir, but since
the repo could be checked out at different places in the local file
system I couldn't use absolute paths.
So I used something like:
$ cat gafrc
(reset-component-library)
(reset-source-library)
(if (access? "sym" R_OK)
(begin
(source-library "_sub_page")
(component-library "sym")
...
)
(begin
(source-library "../_sub_page")
(component-library "../sym")
...
)
)
with links from each subdir (ln -s ../gafrc .)
and I could open the top sch, or a subdir sch and get the same
libraries.
Now this was only two directory levels, and it wouldn't scale well to
more.
So, what's the "best" way to solve that...
Regards,
/Karl Hammar
- Raw text -