| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
| X-Recipient: | geda-user AT delorie DOT com |
| X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
| d=gmail.com; s=20161025; | |
| h=from:date:to:subject:message-id:mail-followup-to:references | |
| :mime-version:content-disposition:in-reply-to; | |
| bh=yt8BidPCq0UO2238Gp7m8QMK57hD3ZwUzfmdaFU/wfk=; | |
| b=s7KVPX/gxiLGlGzlj9fYfOr/WDP1lrXAMdShSq1M9B6lDW6GN5ihFqEmfCEXuMqjXE | |
| 7KPecl0ssbKDv9S3v5w8zD6sYYR85jYE4JKnorvuphetlbHp8J0L93wz+M56G2taEio7 | |
| Evhnv7LE1KmRsc8j2F+/Wh9gcJa3k27keAdIJ/Gy9TodBSG4f+UjKPNuLNM8ccmB9KWv | |
| su4Lq893paNkCTOC8rzD+EyVTv0cERLNzWvprquT39ctyOKcVFx20DrratT7jFhyjEGH | |
| loI+u49FF/AcMD3Op+LxPmHsGzjZ5kE1HAW+dSNWlKLQVl/hTowmRnQfrdBXdIuDJ4uP | |
| +AAA== | |
| X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
| d=1e100.net; s=20161025; | |
| h=x-gm-message-state:from:date:to:subject:message-id:mail-followup-to | |
| :references:mime-version:content-disposition:in-reply-to; | |
| bh=yt8BidPCq0UO2238Gp7m8QMK57hD3ZwUzfmdaFU/wfk=; | |
| b=O7T5NEj30H0upfoEywN7eVCWMVpte4kYqPSNBNDkk+CHrngXTFVaBp2Xx6xUzpOqtX | |
| 4uVUDUAMzQNqI8wIBS0I0GOz4NwgolrEr00ck26tH0LYp9BHaYBWVpHsUzL1zgHoMYjM | |
| ZgdNq3avjwviXeriN+fsLF1EUpHqCXWMCvwttIqb5M3oO+q+4Uv7Zr2rmPaOfVng3JN2 | |
| IXMSUJr18p8CmQc0s8jsjim5CFz7kyo5astNaa4Kb3ldHkY9Lt5utNAP6m5edKNe8buV | |
| QvVY2IqJWULyommzrWNz1qNsA5zDjq0ZPDWYBa5PqmnzZu3e8wHyY8xBsfwIMrZguCN2 | |
| cjTw== | |
| X-Gm-Message-State: | AOAM531XPFHgLu5LV/SsUZLMdlvT0hyu68XwfsMPmbx4TkyOhsTgZeyI |
| +MlvtwFA4urYBzEKxYznUq75ntkszmUrKg== | |
| X-Google-Smtp-Source: | ABdhPJxPZkUA0X8dD7g+kzIdR6xSCP+ed5/NAf199DFuaSJXB8UnecKFlPLKoESoGMgMDtD9esqf7g== |
| X-Received: | by 2002:a2e:b4d0:: with SMTP id r16mr4393525ljm.114.1625333753605; |
| Sat, 03 Jul 2021 10:35:53 -0700 (PDT) | |
| From: | "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> |
| X-Google-Original-From: | Vladimir Zhbanov <vzh AT lepton> |
| Date: | Sat, 3 Jul 2021 20:35:51 +0300 |
| To: | geda-user AT delorie DOT com |
| Subject: | Re: [geda-user] source-library-search |
| Message-ID: | <YOCf91rk80hNHONG@lepton> |
| Mail-Followup-To: | geda-user AT delorie DOT com |
| References: | <20210703144758 DOT 4EA6983DA2A5 AT turkos DOT aspodata DOT se> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20210703144758.4EA6983DA2A5@turkos.aspodata.se> |
| Reply-To: | geda-user AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | geda-user AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
--BUUQjddS3rNZYnRQ
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Karl,
On Sat, Jul 03, 2021 at 04:47:58PM +0200, karl AT aspodata DOT se [via geda-user AT delorie DOT com] wrote:
> source-library-search duplicates the last element in its argument.
>
> ///
>
> If I have (in gafrc):
> (define home (getenv "HOME"))
> (source-library-search (build-path home "git/openhw/share/gschem"))
>
> I get (at startup, e.g. lepton-cli export):
> ** (export:8307): CRITICAL **: 16:20:23.520: Invalid path "/home/karl/git/openhw/share/gschem/gschem/_connector" or source not readable.
>
> and similar lines, why the gschem/gschem duplicate ?
> component-library-search and source-library works lika
> a charm, why not source-library-search ?
>
> If I use "git/openhw/share", it duplicates "share".
> If I use "git/openhw", it duplicates "openhw".
> If I use "git/openhw/share/_sub_page", I get:
>
> Backtrace:
> In ice-9/boot-9.scm:
> 160: 7 [catch #t #<catch-closure 7f9eb23e7460> ...]
> In unknown file:
> ?: 6 [apply-smob/1 #<catch-closure 7f9eb23e7460>]
> In ice-9/boot-9.scm:
> 160: 5 [catch #t #<catch-closure 7f9eb21c9ec0> ...]
> In unknown file:
> ?: 4 [apply-smob/1 #<catch-closure 7f9eb21c9ec0>]
> In /usr/local/share/lepton-eda/scheme/lepton/library.scm:
> 135: 3 [source-library-search "/home/karl/git/openhw/share/_sub_page"]
> 117: 2 [get-tree #f]
> In ice-9/boot-9.scm:
> 105: 1 [#<procedure 7f9eb1fdaf00 at ice-9/boot-9.scm:100:6 (thrown-k . args)> match-error ...]
> In unknown file:
> ?: 0 [apply-smob/1 #<catch-closure 7f9eb21c9e40> match-error ...]
>
> ERROR: In procedure apply-smob/1:
> ERROR: In procedure match: no matching pattern
>
> ** Message: 16:42:49.836: ERROR: Failed to load RC file [/home/karl/.config/lepton-eda/gafrc]: ERROR: no matching pattern
>
> ERROR: Failed to load RC file [/home/karl/.config/lepton-eda/gafrc]: ERROR: no matching pattern
>
> ///
One more bug, thanks for reporting it!
Attached is a patch to fix the issue (hopefully).
Please let me know if it works on your system.
> liblepton/scheme/lepton/library.scm
> mentions set-library-contents as a replacement, but cannot find it.
> Where is it ?
It is "set-library-contents!" (with an exclamation mark), a
would-be replacement for the function. For now, it is not
exported so is not yet available for external code. (I cannot
remember why :-))
--
Vladimir
--BUUQjddS3rNZYnRQ
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="0001-lepton-Fix-source-library-search.patch"
From a4238993ca6cf16e20bd803b794b6098f3c445ba Mon Sep 17 00:00:00 2001
From: Vladimir Zhbanov <vzhbanov AT gmail DOT com>
Date: Sat, 3 Jul 2021 18:42:30 +0300
Subject: [PATCH] lepton: Fix source-library-search().
---
liblepton/scheme/lepton/library.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/liblepton/scheme/lepton/library.scm b/liblepton/scheme/lepton/library.scm
index 5f6ff339f..6d5f642cd 100644
--- a/liblepton/scheme/lepton/library.scm
+++ b/liblepton/scheme/lepton/library.scm
@@ -131,7 +131,7 @@ set-library-contents! instead."
source library. This procedure is legacy and should be avoided in
new code. Use set-library-contents! instead."
(map (lambda (x) (source-library
- (string-append path file-name-separator-string x)))
+ (string-append (dirname path) file-name-separator-string x)))
(get-tree (file-system-tree path))))
--
2.30.2
--BUUQjddS3rNZYnRQ--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |