unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Guix Devel <guix-devel@gnu.org>
Subject: ’guix package --export-manifest’ using ’@version’?
Date: Mon, 04 Jul 2022 21:00:19 +0200	[thread overview]
Message-ID: <868rp8zosc.fsf@gmail.com> (raw)

Hi,

I have not noticed at the time when discussing ’export-manifest’.  Sorry
to have overlooked that.


Because of #:entry-package-version,

--8<---------------cut here---------------start------------->8---
  (match (manifest->code manifest
                         #:entry-package-version
                         manifest-entry-version-prefix)
--8<---------------cut here---------------end--------------->8---

the output of the option ’export-manifest’ is not stateless; as it was
initially commented in 9fd7b050e2198c89f0763fe79f5c541b77b8e5c9 and then
refactored elsewhere (package-unique-version-prefix).

--8<---------------cut here---------------start------------->8---
+        (versions
+         ;; If ENTRY uses the latest version, don't specify any version.
+         ;; Otherwise return the shortest unique version prefix.  Note that
+         ;; this is based on the currently available packages, which could
+         ;; differ from the packages available in the revision that was used
--8<---------------cut here---------------end--------------->8---

For instance, it reads,

--8<---------------cut here---------------start------------->8---
$ guix time-machine --commit=fb32a38db1d3a6d9bc970e14df5be95e59a8ab02 \
       -- package -p gnu/store/vmn2b3cmfwf250i65rgvkamyr4971q7m-profile
         --export-manifest

;; This "manifest" file can be passed to 'guix package -m' to reproduce
;; the content of your profile.  This is "symbolic": it only specifies
;; package names.  To reproduce the exact same profile, you also need to
;; capture the channels being used, as returned by "guix describe".
;; See the "Replicating Guix" section in the manual.

(specifications->manifest
(list "python" "python-numpy"))
--8<---------------cut here---------------end--------------->8---

or it reads,

--8<---------------cut here---------------start------------->8---
$ guix package -p gnu/store/vmn2b3cmfwf250i65rgvkamyr4971q7m-profile \
       --export-manifest
;; This "manifest" file can be passed to 'guix package -m' to reproduce
;; the content of your profile.  This is "symbolic": it only specifies
;; package names.  To reproduce the exact same profile, you also need to
;; capture the channels being used, as returned by "guix describe".
;; See the "Replicating Guix" section in the manual.

(specifications->manifest
(list "python@3.8" "python-numpy@1.17"))
--8<---------------cut here---------------end--------------->8---


I think it is confusing and maybe a wrong pattern.

Many people are already confused by the fact that the package versions
are fixed by the Guix revision and there is no “version solver”; as it
is the case for all the other package managers.

Being able to provide a version in the manifest (or from the CLI) is a
marginal case – when Guix provides several versions of the same
package, it is few cases when the vast majority of the packages have
only one version for one revision.

Somehow, this information about version is redundant (and useless) with
the revision.  The only useful information for capturing the versions is
the revision.

If one has this manifest.scm file with the version specified,
considering that one runs “guix shell -m manifest.scm”, then one would
probably get «error: python: package not found for version 3.8», for
instance.

Moreover, if the profile – created long time ago – contains many more
than 2 packages, then this exported manifest requires many removal of
versions (at least) to be usable with a new revision.


The export of the versions depending on the state appears to me
confusing; for newcomers or people from the classical package managers.
And it provides more work when transitioning from imperative to
declarative.


Therefore, I think ’--export-manifest’ should not report the version and
it should be stateless.  However, we could add a comment about
“--export-channels”.

WDYT?


Cheers,
simon


             reply	other threads:[~2022-07-04 19:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 19:00 zimoun [this message]
2022-07-07  7:57 ` ’guix package --export-manifest’ using ’@version’? Ludovic Courtès
2022-07-07 13:19   ` zimoun
2022-07-07 15:13     ` Ludovic Courtès
2022-07-07 16:53       ` 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=868rp8zosc.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    /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).