Fix submodule update.

Optimize rust cargo integration.
This commit is contained in:
Cor Legemaat 2026-03-30 14:10:45 +02:00
commit 366ef4119f
4 changed files with 30 additions and 14 deletions

View file

@ -143,6 +143,7 @@ git repository.")
(option-ref options 'ebuild-clean) (option-ref options 'ebuild-clean)
(option-ref options 'cache-clean)) (option-ref options 'cache-clean))
(begin (display "Warning, ignoring min-interval to clean files!") (begin (display "Warning, ignoring min-interval to clean files!")
(newline)
(current-time)) (current-time))
(subtract-duration (subtract-duration
(current-time) (current-time)

View file

@ -348,8 +348,14 @@
'())) '()))
'())))) '()))))
(define-public ebuild-default-post-ebuild
(lambda (ebuild parms)
(system* "ebuild" ebuild "manifest")
'()))
(define-public ebuild-default-post (define-public ebuild-default-post
(lambda (ebuilds parms) (lambda* (ebuilds parms
#:key (ebuild-callback ebuild-default-post-ebuild))
;; (display "parms:") (newline) ;; (display "parms:") (newline)
;; (pretty-print parms) ;; (pretty-print parms)
;; (display "ebuild-created:") (newline) ;; (display "ebuild-created:") (newline)
@ -366,13 +372,23 @@
(out-file ebuild) (out-file ebuild)
"\" does not exists!!!"))) "\" does not exists!!!")))
(if (string-suffix? ".ebuild" (out-file ebuild)) (if (string-suffix? ".ebuild" (out-file ebuild))
(system* "ebuild" (out-file ebuild) "manifest"))))) (ebuild-callback (out-file ebuild) parms)
'()))))
(cond ((null? ebuilds) '()) (cond ((null? ebuilds) '())
((assoc-ref ebuilds 'pkg-files) ((assoc-ref ebuilds 'pkg-files)
(map run-post (assoc-ref ebuilds 'pkgfiles))) (assoc-set! ebuilds
'distfiles
(append (append-map run-post
(assoc-ref ebuilds 'pkgfiles))
(assoc-ref ebuilds 'distfiles))))
((assoc-ref (car ebuilds) 'pkgfiles) ((assoc-ref (car ebuilds) 'pkgfiles)
(map run-post (assoc-ref (car ebuilds) 'pkgfiles)))) (cons (assoc-set! (car ebuilds)
ebuilds))) 'distfiles
(append (append-map run-post
(assoc-ref (car ebuilds)
'pkgfiles))
(assoc-ref (car ebuilds) 'distfiles)))
(cdr ebuilds)))))))
;;Procedure to generate the required ebuild from the given releases. ;;Procedure to generate the required ebuild from the given releases.
(define-public ebuild-gen (define-public ebuild-gen
@ -385,6 +401,7 @@
(template #f) (template #f)
(gen-ebuild-hook ebuild-from-tmpl) (gen-ebuild-hook ebuild-from-tmpl)
(post-hook ebuild-default-post) (post-hook ebuild-default-post)
(post-ebuild-hook ebuild-default-post-ebuild)
ignore-autogen-diff) ignore-autogen-diff)
"" ""
(if (>= (assoc-ref parms 'verbosity) verbosity-notice) (if (>= (assoc-ref parms 'verbosity) verbosity-notice)
@ -418,6 +435,7 @@
#:tmpl template #:tmpl template
#:ignore-diff ignore-autogen-diff) #:ignore-diff ignore-autogen-diff)
ebuild-man))) ebuild-man)))
(post-hook ebuild-created vars))) (post-hook ebuild-created vars
#:ebuild-callback post-ebuild-hook)))
version-list))) version-list)))
ebuilds))) ebuilds)))

View file

@ -358,6 +358,7 @@
(template #f) (template #f)
(gen-ebuild-hook gen-nodejs-ebuild) (gen-ebuild-hook gen-nodejs-ebuild)
(post-hook ebuild-default-post) (post-hook ebuild-default-post)
(post-ebuild-hook ebuild-default-post-ebuild)
ignore-autogen-diff) ignore-autogen-diff)
"" ""
((@ (ebuild gen) ebuild-gen) ((@ (ebuild gen) ebuild-gen)
@ -368,4 +369,5 @@
#:template template #:template template
#:gen-ebuild-hook gen-ebuild-hook #:gen-ebuild-hook gen-ebuild-hook
#:post-hook post-hook #:post-hook post-hook
#:post-ebuild-hook post-ebuild-hook
#:ignore-autogen-diff ignore-autogen-diff))) #:ignore-autogen-diff ignore-autogen-diff)))

View file

@ -86,14 +86,9 @@
(define-public repo-update-src (define-public repo-update-src
(lambda (path) (lambda (path)
"" ""
(let ((repo (submodule-lookup (repository-open path) (let ((old-cwd (getcwd)))
"autogen")) (chdir path)
(old-cwd (getcwd))) (system* "/usr/bin/git" "submodule" "update" "--remote" "--merge")
;;Not working for updates only init?
;;(submodule-update repo)
(chdir (string-join (list path "autogen")
file-name-separator-string))
(system* "/usr/bin/git" "pull")
(chdir old-cwd)))) (chdir old-cwd))))
;; TODO guile-git method... ;; TODO guile-git method...