Opened 4 years ago

Closed 14 months ago

#1721 closed defect (fixed)

include file install w/ CHICKEN_INSTALL_PREFIX causes duplicated install prefix in final pathname

Reported by: Kon Lovett Owned by:
Priority: major Milestone: someday
Component: core tools Version: 5.2.0
Keywords: Cc:
Estimated difficulty:

Description

The "After" below fixes my little problem but is not a suggested solution.

-- levenshtein.egg relevant extract:

(scheme-include levenshtein-cost

(files "levenshtein-cost-interface.types.scm"

"levenshtein-cost-interface.scm"
"levenshtein-cost-number.scm"
"levenshtein-cost-fixnum.scm"
"levenshtein-cost-flonum.scm"))

(scheme-include levenshtein-sequence

(files "levenshtein-sequence-interface.types.scm"

"levenshtein-sequence-interface.scm"
"levenshtein-sequence-vector.scm"
"levenshtein-sequence-string.scm"
"levenshtein-sequence-utf8.scm"))

-- Before & After

#495 $ find /usr/local -name 'levenshtein*.scm'
/usr/local/chicken/5/usr/local/chicken/5/share/levenshtein-sequence-interface.types.scm
/usr/local/chicken/5/usr/local/chicken/5/share/levenshtein-cost-flonum.scm
/usr/local/chicken/5/usr/local/chicken/5/share/levenshtein-cost-fixnum.scm
/usr/local/chicken/5/usr/local/chicken/5/share/levenshtein-sequence-vector.scm
/usr/local/chicken/5/usr/local/chicken/5/share/levenshtein-sequence-string.scm
/usr/local/chicken/5/usr/local/chicken/5/share/levenshtein-sequence-interface.scm
/usr/local/chicken/5/usr/local/chicken/5/share/levenshtein-sequence-utf8.scm
/usr/local/chicken/5/usr/local/chicken/5/share/levenshtein-cost-number.scm
/usr/local/chicken/5/usr/local/chicken/5/share/levenshtein-cost-interface.scm
/usr/local/chicken/5/usr/local/chicken/5/share/levenshtein-cost-interface.types.scm

#499 $ srcdiff egg-compile.scm
56,65c56
< ;returns s2 w/o any, one, leading s1
< (define (string-prefix-strip s1 s2)
< (let loop ((ls1 (string->list s1)) (ls2 (string->list s2)))
< (cond ((null? ls1) (list->string ls2))
< ((null? ls2) s2)
< ((char=? (car ls1) (car ls2)) (loop (cdr ls1) (cdr ls2)))
< (else s2)) ) )
<
< (define strip-install-prefix)
< (define override-prefix)
---

(define override-prefix

67,68d57
< (set! strip-install-prefix (lambda (pn) (string-prefix-strip prefix pn)))
< (set! override-prefix
152c141,142
< (strip-install-prefix dest*))))))
---

dest*)))))

#495 $ find /usr/local -name 'levenshtein*.scm'
/usr/local/chicken/5/share/levenshtein-sequence-interface.types.scm
/usr/local/chicken/5/share/levenshtein-cost-flonum.scm
/usr/local/chicken/5/share/levenshtein-cost-fixnum.scm
/usr/local/chicken/5/share/levenshtein-sequence-vector.scm
/usr/local/chicken/5/share/levenshtein-sequence-string.scm
/usr/local/chicken/5/share/levenshtein-sequence-interface.scm
/usr/local/chicken/5/share/levenshtein-sequence-utf8.scm
/usr/local/chicken/5/share/levenshtein-cost-number.scm
/usr/local/chicken/5/share/levenshtein-cost-interface.scm
/usr/local/chicken/5/share/levenshtein-cost-interface.types.scm

Change History (2)

comment:1 Changed 3 years ago by Kon Lovett

(oops - may not be a prefix)
#483 $ srcdiff ../multi-install-prefix/egg-compile.scm egg-compile.scm
56,65c56
< ;returns s2 w/o any, one, leading s1
< (define (string-prefix-strip s1 s2)
< (let loop ((ls1 (string->list s1)) (ls2 (string->list s2)))
< (cond ((null? ls1) (list->string ls2))
< ((null? ls2) s2)
< ((char=? (car ls1) (car ls2)) (loop (cdr ls1) (cdr ls2)))
< (else s2)) ) )
<
< (define strip-install-prefix)
< (define override-prefix)
---

(define override-prefix

67,72d57
< (set! strip-install-prefix
< (lambda (pn)
< (if prefix
< (string-prefix-strip prefix pn)
< pn)))
< (set! override-prefix
156c141,142
< (strip-install-prefix dest*))))))
---

dest*)))))

comment:2 Changed 14 months ago by felix winkelmann

Resolution: fixed
Status: newclosed

I've seen this, but it seems to be fixed in the current dev version

Note: See TracTickets for help on using tickets.