guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help to workaround libgit2 fetch refs issue


From: Phil
Subject: Re: Help to workaround libgit2 fetch refs issue
Date: Fri, 04 Mar 2022 09:34:26 +0000
User-agent: mu4e 1.4.15; emacs 27.2

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 via email to

[Prev in Thread] Current Thread [Next in Thread]