Hi and I'm sorry for the delay.. sex 08 jul 2022 às 10:26:40 (1657286800), ludovic.courtes@inria.fr enviou: > If we do this: > > --8<---------------cut here---------------start------------->8--- > scheme@(guix git)> (define r (repository-open "/home/ludo/.cache/guix/checkouts/4pe5bqkmsmcros5oviwzvmnjlie6jyhx2dciznz7shwawckb32sq/")) > scheme@(guix git)> (define mod (submodule-lookup r "third-party/googletest")) > scheme@(guix git)> mod > $13 = # > scheme@(guix git)> (submodule-update $13) > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > Git error: failed to resolve path '/home/ludo/.cache/guix/checkouts/4pe5bqkmsmcros5oviwzvmnjlie6jyhx2dciznz7shwawckb32sq/third-party/googletest/.git': No such file or directory Nice trick! > (...) > access("/home/ludo/.cache/guix/checkouts/4pe5bqkmsmcros5oviwzvmnjlie6jyhx2dciznz7shwawckb32sq/third-party/googletest/.git", F_OK) = -1 ENOENT (No such file or directory) > (...) > > Thus, looking at ‘git_submodule_update’ in libgit2, it looks as if this > condition was true: > > (submodule_status & GIT_SUBMODULE_STATUS_WD_UNINITIALIZED) > > Hmm, thoughts? Well, I guess ENOENT != GIT_ENOTFOUND and, in that case, I think we are better off gracefully failing to update it than trying to "branch" our local repo. The patch below tests for the directory's existence before proceding with the update. With this patch applied I've managed to refresh pytorch, its submodules and got the following code: --8<---------------cut here---------------start------------->8--- diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index b19af8a1d5..174ba3d39b 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -2871,7 +2871,7 @@ (define-public xnnpack (define-public python-pytorch (package (name "python-pytorch") - (version "1.12.0") + (version "82782") (source (origin (method git-fetch) (uri (git-reference @@ -2881,7 +2881,7 @@ (define-public python-pytorch (file-name (git-file-name name version)) (sha256 (base32 - "0pdqi91qzgyx947zv4pw2fdj9vpqvdhfzw1ydjd4mpqm8g5njgnz")) + "0zshqfqv3lcwyym3l8zx675chnhpxn14c4nr1c2b7ci1zis785va")) (patches (search-patches "python-pytorch-system-libraries.patch" "python-pytorch-runpath.patch")) (modules '((guix build utils))) --8<---------------cut here---------------end--------------->8--- Where "82782" is a ciflow/trunk reference to commit 700dba518be03ee0c0d6389162b5907a13838f49. I've also thought of filtering the submodules list and passing the resulting list instead, but came to conclude that it would clutter the code instead of simplifying it. I hope that helps! ---