Welcome to the CHICKEN Scheme pasting service
weird chicken-install error pasted by siiky on Sat Jul 1 19:21:53 2023
$ chicken-install -v -test sql-null Error: (make-pathname) bad argument type - not a string: 2.0
egg files with non-string "version" field pasted by siiky on Sat Jul 1 19:26:29 2023
$ for egg in */*/*.egg; do echo "${egg}: $(csi -R srfi-197 -p '(chain (read) (alist-ref '"'"'version _ eq? '"'"'(#f)) (car _) ((lambda (v) (cond ((string? v) "string") ((number? v) "number") (else v))) _))' < "${egg}")"; done | less | rg -vw '(string|#f)$' crypt/1.0/crypt.egg: number Error: unterminated list Call history: <syntax> (##core#begin (##core#if (string? v) (##core#begin "string") (##core#if (number? v) (##core#begin "n... <syntax> (##core#if (string? v) (##core#begin "string") (##core#if (number? v) (##core#begin "number") (##cor... <stdin>:1 (string? v) <syntax> (##core#begin "string") <syntax> (##core#if (number? v) (##core#begin "number") (##core#begin v)) <stdin>:1 (number? v) <syntax> (##core#begin "number") <syntax> (##core#begin v) <syntax> (car chain-var60488) <syntax> (alist-ref (quote version) chain-var60477 eq? (quote (#f))) <stdin>:1 (quote version) <stdin>:1 (##core#quote version) <stdin>:1 (quote (#f)) <stdin>:1 (##core#quote (#f)) <stdin>:1 (read) <-- math/0.2.2/math.egg: Error: unterminated list Call history: <syntax> (##core#begin (##core#if (string? v) (##core#begin "string") (##core#if (number? v) (##core#begin "n... <syntax> (##core#if (string? v) (##core#begin "string") (##core#if (number? v) (##core#begin "number") (##cor... <stdin>:1 (string? v) <syntax> (##core#begin "string") <syntax> (##core#if (number? v) (##core#begin "number") (##core#begin v)) <stdin>:1 (number? v) <syntax> (##core#begin "number") <syntax> (##core#begin v) <syntax> (car chain-var60488) <syntax> (alist-ref (quote version) chain-var60477 eq? (quote (#f))) <stdin>:1 (quote version) <stdin>:1 (##core#quote version) <stdin>:1 (quote (#f)) <stdin>:1 (##core#quote (#f)) <stdin>:1 (read) <-- message-digest-utils/4.2.2/message-digest-utils.egg: monad/5.0/monad.egg: number postgresql/4.0.0/postgresql.egg: 4.0.0 postgresql/4.1.0/postgresql.egg: 4.1.0 postgresql/4.1.1/postgresql.egg: 4.1.0 postgresql/4.1.2/postgresql.egg: 4.1.2 postgresql/4.1.3/postgresql.egg: 4.1.3 postgresql/4.1.4/postgresql.egg: 4.1.3 scm2wiki/0.3.1/scm2wiki.egg: 0.3.1 scm2wiki/0.3.2/scm2wiki.egg: 0.3.2 sql-null/2.0/sql-null.egg: number ws-client/0.2.0/ws-client.egg: number ws-client/0.2.1/ws-client.egg: 0.2.1 ws-client/1.0.0/ws-client.egg: 0.2.1
0001-Avoid-crashing-on-egg-files-with-non-string-version-.patch pasted by siiky on Sat Jul 1 20:23:53 2023
From 4b5cab0680420f9f86366c6c587f988c7c2e957d Mon Sep 17 00:00:00 2001 From: siiky <github-siiky@net-c.cat> Date: Sat, 1 Jul 2023 19:17:30 +0100 Subject: [PATCH] Avoid crashing on egg files with non-string `version` field `chicken-install` would crash when building a path if the `version` field of an egg file was not a string, such as `2.0`. --- chicken-install.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chicken-install.scm b/chicken-install.scm index 4a6eb9b1..3af7686c 100644 --- a/chicken-install.scm +++ b/chicken-install.scm @@ -486,12 +486,12 @@ (else ;; <location>/<egg-name>/<version>/<egg-name>.egg (if version - (values (probe-dir (make-pathname egg-dir version)) version) + (values (probe-dir (make-pathname egg-dir (->string version))) version) (let ((versions (directory egg-dir))) (if (null? versions) (values #f #f) (let ((latest (car (sort versions version>=?)))) - (values (make-pathname egg-dir latest) latest))))))))) + (values (make-pathname egg-dir (->string latest)) latest))))))))) (define (write-cache-metadata egg-cache-dir egg-version) (when egg-version @@ -576,7 +576,7 @@ (loop (cdr srvs))))))) ;; The order of probe-dir's here is important. First try ;; the path with version, then the path without version. - ((or (probe-dir (make-pathname (list (car locs) name) lversion)) + ((or (probe-dir (make-pathname (list (car locs) name) (->string lversion))) (probe-dir (make-pathname (car locs) name))) => (lambda (dir) ;; for locally available eggs, check set of files and -- 2.40.1
0001-Avoid-crashing-on-egg-files-with-non-string-version-.patch added by siiky on Sat Jul 1 20:52:29 2023
From 612d1394bf2ba9c97e993148ac44cf44d28d1aa8 Mon Sep 17 00:00:00 2001 From: siiky <github-siiky@net-c.cat> Date: Sat, 1 Jul 2023 19:50:12 +0100 Subject: [PATCH] Avoid crashing on egg files with non-string `version` field `chicken-install` would crash when building a path if the `version` field of an egg file was not a string, such as `2.0`. --- chicken-install.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chicken-install.scm b/chicken-install.scm index 4a6eb9b1..628d64f1 100644 --- a/chicken-install.scm +++ b/chicken-install.scm @@ -576,7 +576,7 @@ (loop (cdr srvs))))))) ;; The order of probe-dir's here is important. First try ;; the path with version, then the path without version. - ((or (probe-dir (make-pathname (list (car locs) name) lversion)) + ((or (probe-dir (make-pathname (list (car locs) name) (->string lversion))) (probe-dir (make-pathname (car locs) name))) => (lambda (dir) ;; for locally available eggs, check set of files and -- 2.40.1