GNU bug report logs -
#42800
[PATCH] Add (guix git-repo-download).
Previous Next
Full log
Message #20 received at 42800 <at> debbugs.gnu.org (full text, mbox):
Hello Danny,
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo <at> gnu.org>
> +;;; Copyright © 2017 Mathieu Lirzin <mthl <at> gnu.org>
> +;;; Copyright © 2017 Christopher Baines <mail <at> cbaines.net>
> +;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
I think you can strip out those copyrights.
> + #:use-module (git) ; FIXME Remove
Why should it be removed?
> + #:use-module (ice-9 match)
> + #:use-module (ice-9 vlist)
> + #:use-module (srfi srfi-1)
> + #:use-module (srfi srfi-34)
> + #:use-module (srfi srfi-35)
> + #:export (android-repo-reference
> + android-repo-reference?
> + android-repo-reference-mainfest-url
^
typo
> + android-repo-reference-revision
> +
> + android-repo-fetch
> + android-repo-version
> + android-repo-file-name))
> +
> +;;; Commentary:
> +;;;
> +;;; An <origin> method that fetches a specific commit from an Android Repo
> +;;; repository.
> +;;; The repository's manifest (URL and revision) can be specified with a
> +;; <android-repo-reference> object.
Missing semicolon.
> +;;;
> +;;; Code:
> +
> +(define-record-type* <android-repo-reference>
> + android-repo-reference make-android-repo-reference
> + android-repo-reference?
> + (manifest-url android-repo-reference-manifest-url)
> + (manifest-revision android-repo-reference-manifest-revision))
> +
> +(define (git-repo-package)
> + "Return the default git-repo package."
> + (let ((distro (resolve-interface '(gnu packages android))))
> + (module-ref distro 'git-repo)))
> +
> +(define* (android-repo-fetch ref hash-algo hash
> + #:optional name
> + #:key (system (%current-system))
> + (guile (default-guile))
> + (git-repo (git-repo-package)))
> + "Return a fixed-output derivation that fetches REF, an
> +<android-repo-reference> object. The output is expected to have recursive
> +hash HASH of type HASH-ALGO (a symbol). Use NAME as the file name, or a
> +generic name if #f."
if unset.
> + ;; TODO: Remove.
> + (define inputs
> + (standard-packages))
Why should it be removed?
> + (or (android-repo-fetch (getenv "android-repo manifest-url")
> + (getenv "android-repo manifest-revision")
Spaces in env variable names are quite unusual.
> + (with-directory-excursion directory
> + (invoke git-repo-command "init" "-u" manifest-url "-b" manifest-revision
> + "--depth=1")
It could also be useful to be able to select the manifest name, using
the "-m" switch.
> + (invoke git-repo-command "sync" "-c" "--fail-fast" "-v" "-j" "3")
Any specific reason to default to 3 threads?
Otherwise this looks nice!
Thanks,
Mathieu
This bug report was last modified 271 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.