From: Wojtek Kosior via <help-guix@gnu.org>
To: Gottfried <gottfried@posteo.de>
Cc: Csepp <raingloom@riseup.net>, help-guix@gnu.org
Subject: Re: installing of two versions of package Musescore
Date: Wed, 21 Dec 2022 19:53:57 +0100 [thread overview]
Message-ID: <20221221195357.22e6cc41.koszko@koszko.org> (raw)
In-Reply-To: <22bd03bb-8de5-77b8-0a34-86486f6042b6@posteo.de>
[-- Attachment #1: Type: text/plain, Size: 9521 bytes --]
> I understood that the best would be to create a separate profile
> and have Musescore in it.
>
> But which version?
> [...]
> ................................................
> Or should I do it the other way round:
> to put version 4.0 in a separate profile,
> and keep version 3.6.2 in my main profile,
> but AFAIU that would mean during updating
> I will loose 3.6.2 for ever.
> ................................................
You can still install 3.6.2 by using `guix time-machine`[1].
Nevertheless, I'm under impression we're missing something. Since I
subscribed to the help-guix mailing list, I've seen at least 2
questions about `guix upgrade` giving some stupid errors. Experienced
users then recommended using manifests instead.
What has just been suggested to you and what we are considering now is
- creating a profile using a manifest
- and later updating that profile using `guix upgrade`.
While this is possible, it seems we're missing the opportunity that
manifests give us — to manage the already-existing profiles
declaratively, through code. This way we can ditch the `guix upgrade`
altogether. I believe this is what some of those people actually meant.
Let me quote part of the `-m` option description from the "Invoking
guix package" section of the Guix manual
> --manifest=file
> -m file
> Create a new generation of the profile from the manifest object returned by the
> Scheme code in file. This option can be repeated several times, in which case
> the manifests are concatenated.
> This allows you to declare the profile’s contents rather than constructing it
> through a sequence of --install and similar commands. The advantage is that
> file can be put under version control, copied to different machines to reproduce
> the same profile, and so on.
What does this mean? That instead of updating with shell commands like
guix pull
guix package --upgrade # optionally add `-p` option here
you can update with
guix pull
guix package --manifest path/to/your/manifest.scm # optionally add `-p` option here
Also, instead of installing new packages with e.g.
guix package --install guile-frobnicator # optionally add `-p` option here
you'd just include the desired package ("guile-frobnicator" in this
case) in your manifest file and repeat the
guix package --manifest path/to/your/manifest.scm # optionally add `-p` option here
Now, there's one more thing worth noting. In order to install an older
version of the musescore package with manifests, you can't just use the
`guix time-machine` command as I suggested before. Or, well, you could
but then *all* packages in the profile would end up being taken from an
older guix version.
Instead, manifests allow you to use Inferiors (described here[2]) which
provide an analogous feature to `guix time-machine` but through a Guile
API.
I hope I helped and not made it unbearably complex to grasp 😅
Best luck, happy hacking,
Wojtek
[1] https://guix.gnu.org/en/manual/en/html_node/Invoking-guix-time_002dmachine.html#Invoking-guix-time_002dmachine
[2] https://guix.gnu.org/manual/en/html_node/Inferiors.html
-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A
Meet Kraków saints! #43: saint Rafał Kalinowski
Poznaj świętych krakowskich! #43: święty Rafał Kalinowski
https://pl.wikipedia.org/wiki/Rafał_Kalinowski
-- (sig_end)
On Wed, 21 Dec 2022 13:17:06 +0000
Gottfried <gottfried@posteo.de> wrote:
> Thanks very much Csepp,
>
> I am getting closer to it.
> .................................................
> I want to have Musescore 3.6.2 for long time,
> and additionally Musescore 4.0.
>
> I understood that the best would be to create a separate profile
> and have Musescore in it.
>
> But which version?
> Should I put the version 3.6.2 in my new profile to keep it,
>
> and in my main profile during updating
> it will eventually install version 4.0?
> ................................................
> Or should I do it the other way round:
> to put version 4.0 in a separate profile,
> and keep version 3.6.2 in my main profile,
> but AFAIU that would mean during updating
> I will loose 3.6.2 for ever.
> ................................................
>
> When using "Guix shell", AFAIU, I would have to do it on a daily basis,
> because every time I switch off my laptop,
> its lost. Is it like that?
> ................................................
>
> Kind regards
>
> Gottfried
>
>
>
> Am 20.12.22 um 18:02 schrieb Csepp:
> >
> > Gottfried <gottfried@posteo.de> writes:
> >
> >> [[PGP Signed Part:Undecided]]
> >> Hi Csepp,
> >>
> >> this was anyhow my question.
> >>
> >>>> In general you do not need to install packages under development in your
> >>>>> main profile. It would be better to either put it in a separate profile
> >>>>> or use a temporary shell every time and put the package definition in a
> >>>>> manifest or script.
> >>
> >>
> >> Until now I installed everything in my main profile
> >>
> >> 1. I don't know yet how to create a profile/manifest.
> >>
> >> I was reading the cookbook and the manual already several times about
> >> that, but it seems to me difficult.
> >
> > A simple way to do it is:
> > ```
> > guix shell --export-manifest python python-sympy | tee guix.scm
> > ```
> >
> > It even works with transforms, so let's say you were working on getting
> > the newest version of Cutter running:
> > ```
> > guix shell --export-manifest --with-latest=cutter cutter | tee guix.scm
> > ```
> >
> >> 2. If I create an other profile through a manifest
> >> what is the benefit of it in my case?
> >
> > You can load the profile separately and it should be overlaid on top of
> > your normal profile, shadowing the Musescore binary from it.
> > The advantage of a persistent profile (as opposed to a manifest on its
> > own) is that it will survive garbage collection, so you won't be
> > building the same package again and again.
> >
> > Another benefit is that you can upgrade them separately. This is why I
> > have TeXlive installed in a separate profile, because it is a several
> > gigabyte download, so I'd rather not have to wait for it every time I
> > upgrade my default profile.
> >
> >> 3. I would have to put all my 60 packages there (how?) and if I
> >> download an other package, would I have to create the manifest again
> >> and again?
> >
> > No. Profiles are not chroots, or containers, or VMs, or anything like
> > that. Profiles can be composed. In fact, if you are using Guix System,
> > you are already using two profiles stacked on top of each other: the
> > system profile at /run/current-system and your default user profile at
> > $HOME/.guix-profile.
> > Packages installed in your system profile do not have to be installed in
> > your user profile. You *can* install them in it, but it's not
> > necessary.
> > Similarly, if you install a different version of Musescore in a separate
> > profile, that only has to contain Musescore and nothing else.
> > I have a graphics profile and it only contains a few programs, like
> > Blender, Inkscape, etc. But for example it does not have Emacs in it,
> > because Emacs is loaded by my default user profile at
> > $HOME/.guix-profile.
> >
> >> 4. And if I want to update the packages, lets say every second week,
> >> then I would have to create the manifest again every second week.
> >
> > No, the manifest file stays the same. It's just a list of packages.
> > To upgrade a persistent profile you can just use the usual method:
> > ```
> > guix package --upgrade --profile=/path/to/profile
> > ```
> >
> > If you don't want to make a persistent profile, you can instead do:
> > ```
> > guix shell --manifest=guix.scm
> > ```
> >
> >> 5. Would I then have to uninstall all my installed packages in the
> >> main profile, in order not to have it twice?
> >
> > No, see above.
> > Also having multiple version of a package installed is not a problem on
> > Guix, only if they are in the same profile. You can have as many
> > conflicting version as you want, they won't concflict if they are not in
> > the same profile.
> >
> >> 6. How could I then use my manifest? Which commands would I have to
> >> use to open it and to use my packages?
> >
> > For a temporary shell (see above on how to create guix.scm):
> > ```
> > guix shell --manifest=guix.scm
> > ```
> >
> > For a persistent profile:
> > ```
> > # first create the profile
> > guix package --profile=/path/to/profile
> > # then load it
> > export GUIX_PROFILE=/path/to/profile
> > source "${GUIX_PROFILE}/etc/profile"
> > # alternatively:
> > source /path/to/profile/etc/profile
> > # there are some subtle differences between the two
> > ```
> >
> > Caveat for persistent profiles:
> > if you modify the profile (for example by installing a new package in
> > it) then you might have to load it again.
> > More precisely: if the list of environment variables in the profile
> > changes, you have to reload it. Otherwise if the GUIX_PROFILE
> > environment variable was defined correctly when you first loaded it,
> > then you don't have to reload it.
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-12-21 18:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 8:23 installing of two versions of package Musescore Gottfried
2022-12-19 13:55 ` Csepp
2022-12-19 14:19 ` Gottfried
2022-12-20 17:02 ` Csepp
2022-12-21 13:17 ` Gottfried
2022-12-21 18:06 ` Csepp
2022-12-22 13:21 ` Gottfried
2022-12-22 14:47 ` Csepp
2022-12-21 18:53 ` Wojtek Kosior via [this message]
2022-12-24 14:08 ` Gottfried
2022-12-26 18:33 ` Wojtek Kosior via
2022-12-27 11:30 ` Csepp
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=20221221195357.22e6cc41.koszko@koszko.org \
--to=help-guix@gnu.org \
--cc=gottfried@posteo.de \
--cc=koszko@koszko.org \
--cc=raingloom@riseup.net \
/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.
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).