From: Mathieu Othacehe <othacehe@gnu.org>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: 42800@debbugs.gnu.org
Subject: [bug#42800] [PATCH v2] Add (guix android-repo-download).
Date: Thu, 13 Aug 2020 11:02:28 +0200 [thread overview]
Message-ID: <878seisyu3.fsf@gnu.org> (raw)
In-Reply-To: <20200812221208.31262-1-dannym@scratchpost.org> (Danny Milosavljevic's message of "Thu, 13 Aug 2020 00:12:08 +0200")
Hello Danny,
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
> +;;; Copyright © 2017 Mathieu Lirzin <mthl@gnu.org>
> +;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
> +;;; Copyright © 2020 Jakub Kądziołka <kuba@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
next prev parent reply other threads:[~2020-08-13 9:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 11:39 [bug#42800] [PATCH] Add (guix git-repo-download) Danny Milosavljevic
2020-08-10 14:50 ` Jakub Kądziołka
2020-08-10 15:05 ` Danny Milosavljevic
2020-08-10 15:38 ` Jakub Kądziołka
2020-08-12 22:12 ` [bug#42800] [PATCH v2] Add (guix android-repo-download) Danny Milosavljevic
2020-08-13 9:02 ` Mathieu Othacehe [this message]
2020-09-02 13:04 ` bug#42800: " Danny Milosavljevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878seisyu3.fsf@gnu.org \
--to=othacehe@gnu.org \
--cc=42800@debbugs.gnu.org \
--cc=dannym@scratchpost.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).