Commit c86ecb0d authored by Erick Gallesio's avatar Erick Gallesio

Fixed the dependencies sort

parent 01e140dc
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
;;;; Creation date: 11-Dec-2006 14:39 (eg)
;;;; Last file update: 28-Feb-2007 22:40 (eg)
;;;; Last file update: 4-Mar-2007 14:41 (eg)
;;;;
......@@ -55,7 +55,12 @@
(define-macro (%push! lst v)
`(set! ,lst (cons ,v ,lst)))
(define *ignored-interface-clauses*
'(maintainer authors description categories license snow))
;; ======================================================================
;; interface ...
;; ======================================================================
......@@ -102,7 +107,7 @@
(reverse (scmpkg-package-exceptions pkg)))
;; Records
,@(map (lambda (x)
`(%define-exported-record ,(car x) ,@cdr x))
`(%define-exported-record ,(car x) ,@(cdr x)))
(reverse (scmpkg-package-records pkg)))
;; Body
(include ,(scmpkg-package-source pkg)))
......@@ -172,7 +177,9 @@
((export . ?exp)
(set! (scmpkg-package-exports pkg) exp))
(else
(error 'interface "Invalid clause ~S" clause))))
(unless (and (pair? clause)
(memq (car clause) *ignored-interface-clauses*))
(error 'interface "Invalid clause ~S" clause)))))
body)
(patch-package! pkg)))
......
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
;;;; Creation date: 14-Jan-2007 13:37 (eg)
;;;; Last file update: 18-Feb-2007 19:54 (eg)
;;;; Last file update: 4-Mar-2007 15:36 (eg)
;;;;
;; ----------------------------------------------------------------------
......@@ -96,7 +96,7 @@
(define (list->set lst res)
(cond
((null? lst) res)
((null? lst) (reverse! res))
((member (car lst) res) (list->set (cdr lst) res))
(else (list->set (cdr lst) (cons (car lst) res)))))
......@@ -115,11 +115,15 @@
(cons (format "@~a" lang) deps))))
(if (null? all)
all
(append all (apply append (map deps* all))))))
(append (apply append (map deps* all))
all))))
;;
;; package-deps* starts here
;;
(eprintf "Dependance(~s) ==> ~S\n=> ~S\n" package (deps* package)
(list->set (deps* package) '()))
(list->set (deps* package) '()))
;; ----------------------------------------------------------------------
......
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
;;;; Creation date: 26-Dec-2006 17:44 (eg)
;;;; Last file update: 16-Feb-2007 23:50 (eg)
;;;; Last file update: 4-Mar-2007 12:26 (eg)
;;;;
;; ----------------------------------------------------------------------
......@@ -45,12 +45,8 @@
;* parse-pkgball-name ... */
;*---------------------------------------------------------------------*/
(define (parse-pkgball-name name)
(if (pkgball? name)
(match-case (string-split (basename (pkgball-sans-suffix name)) "-")
((?name ?tuning ?version)
(values name tuning version))
((?name ?version)
(values name #f version))
(else
(values #f #f #f)))
(values #f #f #f)))
(let ((res (regexp-match "(_*[^_]+)_*([a-z]+)*-([0-9]+.[0-9]+.[0-9]+).tar.gz"
name)))
(if res
(values (cadr res) (caddr res) (cadddr res))
(values #f #f #f))))
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
;;;; Creation date: 26-Dec-2006 18:20 (eg)
;;;; Last file update: 18-Feb-2007 20:08 (eg)
;;;; Last file update: 4-Mar-2007 13:52 (eg)
;;;;
(define interesting-tuning "stklos") ; The tuning we want to keep in our base
......@@ -133,7 +133,7 @@
(fprintf out ";; -*- Scheme -*- Generated file DO NOT EDIT\n")
(fprintf out ";; Synchronization of ~a at ~s\n" server-name url)
(fprintf out ";; State saved ~a\n" (date))
(write pkgs out)
(pp pkgs :port out)
(newline out)
(close-port out))))
(eprintf "done\n"))
......@@ -167,13 +167,13 @@
(define (find-package pkg)
(define (parse-name name)
(match-case (string-split name "-")
((?name ?version)
(values name version))
((?name)
(values name #f))
(else
(error 'find-package "bad package name" name))))
(let ((res (regexp-match-positions "(.+)-([0-9]+.[0-9]+.[0-9]+)" name)))
(if res
;; We had a version
(values (apply substring name (cadr res))
(apply substring name (caddr res)))
;; No version seen
(values name #f))))
(receive (name version)
(parse-name pkg)
......@@ -267,7 +267,6 @@
(define (add-description-to-local-repository! descr)
(define (insert-descr lst type name version descr)
(eprintf "ON insre ~S\n" descr)
(let ((descr-tuning-only (key-get (cddr descr) :tuning-only #f)))
(let Loop ((lst lst)
(res '()))
......@@ -291,7 +290,6 @@
(vers (key-get (cddr descr) :version "0.0.0"))
(new (insert-descr old type name vers descr)))
;; save the new version
(eprintf "Resultat des courses ~S\n" new)
(with-output-to-file repo
(lambda ()
(pp new :port #t)))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment