unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil <phil@beadling.co.uk>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>,
	Guix Devel <guix-devel@gnu.org>
Subject: Re: Help to workaround libgit2 fetch refs issue
Date: Fri, 04 Mar 2022 09:34:26 +0000	[thread overview]
Message-ID: <875yougixp.fsf@beadling.co.uk> (raw)
In-Reply-To: <CAOvsyQtWoK3wzc_cCJ7-SV7ebkrC3xzVBqpzqaakeSnyna7YvA@mail.gmail.com>

Just to add....

Duplicating of guix-checkout in a private channel has side-effects - if
anyone has any ideas of how to workaround this, I'd be love to
discuss... alas, at this point I think I have 3 temporary options:

1) Patch in my local Guix and roll my own build of Guix (see below)
2) Workaround outside of Guix by cloning the repo for Guix not using libgit2
3) Tell my CI/CD to continue to build all my PRs twice if the first
build fails.

Details below.

Phil writes:

> Thanks for the reply Liliana,
>
> On Wed, 2 Mar 2022 at 21:06, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote:
>
> I've included what I think is a true minimal implementation, borrowing from (guix git) where possible to minimize duplication - in
> case anyone else ever stumbles into the same issue (although it's pretty niche, I admit!).

Whilst my original post works it restricts the use of --with-branch and
--with-commit options with packages that use my new record type.

It's now obvious why, looking at package-git-url it only handles origin
and git-checkout records.  I need to add my git-checkout-x-ref here too:

(define (package-git-url package)
  "Return the URL of the Git repository for package, or raise an error if
the source of PACKAGE is not fetched from a Git repository."
  (let ((source (package-source package)))
    (cond ((and (origin? source)
                (git-reference? (origin-uri source)))
           (git-reference-url (origin-uri source)))
          ((git-checkout? source)
           (git-checkout-url source))
          (else
           (raise
            (formatted-message (G_ "the source of ~a is not a Git reference")
                               (package-full-name package)))))))


  reply	other threads:[~2022-03-04  9:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 18:31 Help to workaround libgit2 fetch refs issue Phil
2022-03-02 21:06 ` Liliana Marie Prikler
2022-03-03 18:20   ` Phil
2022-03-04  9:34     ` Phil [this message]
2022-03-04 17:43       ` Liliana Marie Prikler
2022-03-05 11:57         ` Phil
2022-04-30  9:28           ` zimoun

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=875yougixp.fsf@beadling.co.uk \
    --to=phil@beadling.co.uk \
    --cc=guix-devel@gnu.org \
    --cc=liliana.prikler@gmail.com \
    /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).