About mate-1.26 patchs status.

2022-03-03 Thread tumashu
Hello:


   I have sent some patchs about mate-1.26 to guix-patches, but seem to no 
response for a week,
 I would like to know its status :-)



1. https://issues.guix.gnu.org/54166

2. [my develop repo]: https://github.com/tumashu/guix



Thanks!


Re: Help to workaround libgit2 fetch refs issue

2022-03-03 Thread Phil
Thanks for the reply Liliana,

On Wed, 2 Mar 2022 at 21:06, Liliana Marie Prikler <
liliana.prik...@gmail.com> wrote:

>
> >> In Guix this means that the first time I build a PR it fails, and I
> >> have to do something like "guix build  foo | guix build foo" which is
> >> at best a clumsy hack, but it works!
> >Note that you could alternatively just use the requesting repo URL in
> >the git-reference.  Ah, but that would be too boring, wouldn't it?
>

Ha ha - indeed far too boring :-) If you're suggesting I use an HTTP(S)/URL
to access the repository, then annoingly in my specific case the repo is
password protected - this is why I turned to SSH in the first place so I
could use keys to authenticate.  Or I'm missing the point?



> >> I was wondering if anyway could confirm this and/or give me a pointer
> >> of where the compliation occurs (where the record in the source is
> >> handled and compiled into a git clone) - even if my approach is
> >>(quite possibly) unviable, I'd like to understand why!
> >The source field of a package is not thunked, so it is compiled in the
> >package definition itself, rather than handed off.  Note that every
> >hack of doing something fancyful usually invokes at least a delay form,
> >see e.g. the computed-origin-method used by linux-libre.  Hope that
> >helps.
>
>
Yes - thanks for the hints, I got there in the end.  Just to confirm that
although perhaps not the most elegant workaround, I eventually got the idea
to work.

My original effort lacked the exports for the below, and a few other
missing items private to (guix git).
update-cached-checkout-x-ref
latest-repository-commit-x-ref

Having dug a bit deeper into how the hash table for %gexp-compilers is
setup as a mapping of to record type descriptior to gexp-compiler, I've got
a better understanding now of how package compilation works so it was a
worthy if experiment :-)

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!).

Now to go and fix it properly in libgit2


;; -*- mode: scheme; eval: (guix-devel-mode 1);
geiser-scheme-implementation: guile -*-


;; This is an alternative to guix-checkout record type, which always does a
fetch
;; even after the initial clone.
;; This is required because of a bug in libgit2 which means that fresh
clones
;; don't pull down any additional refs from the git config:
;; https://github.com/libgit2/libgit2/issues/6183

;; Once this is fixed and Guix builds against the fixed version this should
;; be removed.

(define-module (my-tools git)
  #:use-module (git) ;; openable-repository
  #:use-module (guix git) ;; avoid duplication - use all public members
from here
  #:use-module (guix cache) ;; maybe-remove-expired-cache-entries
  #:use-module (guix store) ;; add-to-store
  #:use-module (guix records)
  #:use-module (guix gexp)
  #:use-module (ice-9 match)
  #:use-module (ice-9 ftw) ;; scandir
  #:use-module (srfi srfi-1) ;; filter-map
  #:use-module (srfi srfi-11) ;; let*-values
  #:export (
update-cached-checkout-x-ref
latest-repository-commit-x-ref

git-checkout-x-refs
git-checkout-x-refs?
git-checkout-x-refs-url
git-checkout-x-refs-branch
git-checkout-x-refs-commit
git-checkout-x-refs-recursive?))


;; Avoid duplicating required private functions
(define make-default-fetch-options (@@ (guix git)
make-default-fetch-options))
(define resolve-reference (@@ (guix git) resolve-reference))
(define clone/swh-fallback (@@ (guix git) clone/swh-fallback))
(define switch-to-ref (@@ (guix git) switch-to-ref))
(define update-submodules (@@ (guix git) update-submodules))
(define reference-available? (@@ (guix git) reference-available?))
(define cached-checkout-expiration (@@ (guix git)
cached-checkout-expiration))
(define %checkout-cache-cleanup-period (@@ (guix git)
%checkout-cache-cleanup-period))
(define delete-checkout (@@ (guix git) delete-checkout))
(define print-git-error (@@ (guix git) print-git-error))


(define* (update-cached-checkout-x-ref url
   #:key
   (ref '())
   recursive?
   (check-out? #t)
   starting-commit
   (log-port (%make-void-port "w"))
   (cache-directory
(url-cache-directory
 url (%repository-cache-directory)
 #:recursive? recursive?)))
  "Update the cached checkout of URL to REF in CACHE-DIRECTORY.  Return
three
values: the cache directory name, and the SHA1 commit (a string)
corresponding
to REF, and the relation of the new commit relat