GNU bug report logs - #49958
[PATCH] More flexibility in opam importer

Previous Next

Package: guix-patches;

Reported by: Alice BRENON <alice.brenon <at> ens-lyon.fr>

Date: Mon, 9 Aug 2021 15:04:02 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alice BRENON <alice.brenon <at> ens-lyon.fr>
Subject: bug#49958: closed (Re: [bug#49958] [PATCH] More flexibility in
 opam importer)
Date: Fri, 20 Aug 2021 22:09:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#49958: [PATCH] More flexibility in opam importer

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 49958 <at> debbugs.gnu.org.

-- 
49958: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49958
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Julien Lepiller <julien <at> lepiller.eu>
To: Alice BRENON <alice.brenon <at> ens-lyon.fr>
Cc: 49958-done <at> debbugs.gnu.org, Xinglu Chen <public <at> yoctocell.xyz>
Subject: Re: [bug#49958] [PATCH] More flexibility in opam importer
Date: Sat, 21 Aug 2021 00:07:48 +0200
Le Fri, 13 Aug 2021 15:47:17 +0200,
Alice BRENON <alice.brenon <at> ens-lyon.fr> a écrit :

> Re-phrased the new documentation explaining how versions are selected
> from the repositories in case several contain the same package.
> 
> Sincerely hope it's the last one : )

Pushed to master as fc29c80b9635ff490bcc768c774442043cb1e231, thanks!

[Message part 3 (message/rfc822, inline)]
From: Alice BRENON <alice.brenon <at> ens-lyon.fr>
To: guix-patches <at> gnu.org
Subject: [PATCH] More flexibility in opam importer
Date: Mon, 9 Aug 2021 14:04:07 +0200
[Message part 4 (text/plain, inline)]
Hello,

I'd like to submit this patch for review, discussion and hopefully
inclusion to guix' code. I recently tried to import grew[0], a NLP tool
written in ocaml and distributed with opam but from a custom repository.

The current importer prevented me to do so for several reasons:

- the available repositories were hard-coded to be either opam's
  official repository or coq's
- the repositories were expected to be distributed with git: while
  public git repositories do exist for coq and opam's official
  repository, they are not the source of truth for the opam tool one
  can use in an imperative setup like this:
    `opam repo add coq-released https://coq.inria.fr/opam/released`
  it entailed that assumptions were made about the freshness of the git
  repositories and the actual files served to opam, hence differences
  could theoretically be observed
- it appears that the opam tool doesn't enforce as strict a structure on
  its repositories as its current documentation[1] suggests. Grew's own
  repository has all versions of each package directly under
  `/packages/` instead of in a separate subdirectory. While this
  deserves a clarification from opam's part, this patch hardens guix
  opam importer against such exotic layouts.
- the unability to query several repositories at once rendered
  recursive imports inefficient, as some packages on a custom
  opam repository may still need dependencies from the official opam
  repository even if no guix package has been imported for it yet (this
  was the case with ocaml-ANSITerminal in my case)

The current proposal attempts to solve these difficulties, and allowed
me to actually import the guix declaration for grew and its
dependencies. I'm still fixing the imported declaration and intend to
submit a separate patch to add it to guix packages when it works. I
added grew's custom opam repository to the list of known-repositories
because it was my immediate target but this is of course not important
and could be reverted in favour of coq and opam's official repository
only.

I used the emacs scripted auto-indenter to save a little time to my
reviewers and had to discard many changes that weren't related to my
changes to cut the noise. Maybe this file should be reindented in a
separate commit following the approval or rejection of this patch
proposal.

Cheers,


Alice

[0]: https://grew.fr/
[1]: https://opam.ocaml.org/doc/Manual.html#Repositories
[0001-guix-opam.patch (text/x-patch, attachment)]

This bug report was last modified 3 years and 336 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.