unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Gottfried <gottfried@posteo.de>
To: Gary Johnson <lambdatronic@disroot.org>
Cc: help-guix@gnu.org
Subject: I am sorry Re: Help-Guix Digest, Vol 88, Issue 4
Date: Fri,  7 Apr 2023 14:31:04 +0000	[thread overview]
Message-ID: <b2fe5b8e-728b-f737-d906-9318af121b90@posteo.de> (raw)
In-Reply-To: <46956a31-b505-453b-2fa2-e59b21736836@posteo.de>


[-- Attachment #1.1.1: Type: text/plain, Size: 6894 bytes --]

Hi,
I am sorry, I mixed up two questions.
I was already one thought ahead.

1. Question about activating all profiles at login time
2. Question updating all profiles at once.

1.
to avtivate all profiles at once
You wrote that it would be better to have only one package in one profil.
So I would have to use each package in a separate profil

Musescore version 4.0.2
and Musescore version 3.6.2
are in different profiles,
so I guess it shouldn’t be a problem
What do you say?

2.
To update all profiles at once
this is a different question, which I have to deal as well.

Is there a way to do it?

Is there a way to exclude the profile "Musik" because this profile I
  have to upgrade with:

  guix package -p /home/gfp/Projekte/Musik/guix-profil -m
  /home/gfp/Projekte/Musik/musik.scm

  or put Musescore 3.6.2 in a separate profil,
but still the question remains, that this profil should then not be 
included in the update process.

  Kind regards

Gottfried



Am 07.04.23 um 15:02 schrieb Gottfried:
> Hi,
> 
> thanks a lot for sharing.
> This helps a lot.
> Without help of you and other hackers I would be lost.
> ............................................................
> 
> Those profiles I have got at the moment
> 
> gfp@Tuxedo ~$ guix package --list-profiles
> 
> /home/gfp/Projekte/Calibre/guix-profil
>      with one package Calibre
> 
> /home/gfp/Projekte/EmacsManifest/guix-profil
>      with one package Emacs
> 
> /home/gfp/Projekte/GNUCash/guix-profil,
>      with 2 packages:
>      Gnucash
>      homebank
> 
> /home/gfp/Projekte/Lilypond/guix-profil
>      with many packages:
>      lilypond,
>      mercurial,
>      timidity,
>      frescobaldi,
>      audio-to-midi,
>      libsmf,
>      ctrlr,
>      muse-sequencer,
>      fluidsynth,
>      fluida-lv2,
>      qsynth
> 
> /home/gfp/Projekte/Musescore/guix-profil
>      with one package Musescore 4.0.2 (current version)
> 
> /home/gfp/Projekte/Musik/guix-profil
>      with many packages:
>      ardour,
>      audacious,
>      audacity,
>      obs,
>      vlc
>      Musescore 3.6.2 (old version)
> 
> /home/gfp/Projekte/Photoflare/guix-profil
>      with 2 packages
>      photoflare
>      imagemagick
>      (later converseen, which is now in a own profile:
>       prefabricated by Csepp)
> 
> /home/gfp/Projekte/Scribus/guix-profil
>      with 2 packages:
>      scribus,
>      xournal
> 
> /home/gfp/.config/guix/current
> 
> /home/gfp/.guix-profile
> 
> -----------------------------------------------------------
>> Note that this may
>>> lead to unpredictable behavior if you have the same package installed
>>> into multiple profiles that are all activated simultaneously. My
>>> recommendation is that you install each package into only one profile
>>> when using this approach.
> 
> Now I have several problems with your approach.
> 1. I have more packages in one profile
> 2. Musescore has got an own profile,
>      but Musescore 3.6.2 (old version) is in the profile "Musik"
>      together with other packages, which should be upgraded.
>      But Musescore 3.6.2 should not be upgraded.
> 
> ..................................................................
> What can I now do, that I can activate multiple profiles at login time?
> Is there a way to exclude the profile "Musik" because this profile I 
> have to upgrade with:
> 
> guix package -p /home/gfp/Projekte/Musik/guix-profil -m 
> /home/gfp/Projekte/Musik/musik.scm
> 
> or to add it in the script
> ....................................................................
> 
> Kind regards
> 
> Gottfried
> 
> 
> Am 21.03.23 um 15:42 schrieb Gary Johnson:
>> Gottfried <gottfried@posteo.de> writes:
>>
>>> I have got now 3 profiles: EmacsManifest, Musescore, Musik
>>> in:  home/gfp/Projekte/
>>>
>>> Now I want them to be activated at login time.
>>>
>>> I still am not sure how to do that.
>>
>> To activate multiple profiles at login time, I created a shell script
>> called `~/sys/scripts/activate-profiles.sh`, containing the following 
>> code:
>>
>> ```
>> #!/bin/sh
>>
>> GUIX_PROFILES=/home/gjohnson/sys/guix/profiles
>>
>> for dir in $GUIX_PROFILES/*
>> do
>>      name=$(basename "$dir")
>>      profile=$dir/$name
>>      if [ -f "$profile"/etc/profile ]
>>      then
>>          GUIX_PROFILE="$profile"
>>          . "$GUIX_PROFILE"/etc/profile
>>          export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH"
>>          export 
>> INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH"
>>      fi
>>      unset profile
>>      unset name
>> done
>> ```
>>
>> Next, I added a `source` line to my `~/.bash_profile` file, which loads
>> the `activate-profiles.sh` script when I enter a login shell. This
>> script is also run when you log in to your graphical desktop session in
>> Guix.
>>
>> ```
>> # Activate all of my Guix profiles
>> source ~/sys/scripts/activate-profiles.sh
>> ```
>>
>> For you to use this approach, you should do the following:
>>
>> 1. Replace `GUIX_PROFILES=/home/gjohnson/sys/guix/profiles` in my
>>     `activate-profiles.sh` script with your profile directory, which
>>     seems to be this:
>>
>>     `GUIX_PROFILES=/home/gfp/Projekte`
>>
>> 2. Place the `activate-profiles.sh` script somewhere in your home
>>     directory.
>>
>> 3. Replace `~/sys/scripts/activate-profiles.sh` in `~/.bash_profile`
>>     with the path to `activate-profiles.sh` on your system.
>>
>> If you use `guix home`, you can certainly add the `source` line to
>> `~/.bash_profile` that way.
>>
>>> 2. after that, could I uninstall the package emacs in my main profile?
>>> Will my Emacs-manifest profile still be usable/is it independent, or
>>> it will suffer through uninstalling emacs in my main profile?
>>
>> With this code in place, whenever you log in to your machine, you will
>> have access to all the packages in your main user profile as well as all
>> the packages in your /home/gfp/Projekte profiles. Note that this may
>> lead to unpredictable behavior if you have the same package installed
>> into multiple profiles that are all activated simultaneously. My
>> recommendation is that you install each package into only one profile
>> when using this approach.
>>
>>> My aim was to uninstall packages in my main profile and put them in
>>> separate profiles, so in updating my main profile with less packages
>>> it doesn’t take so much time.
>>
>> Yes, that is precisely the purpose of this approach.
>>
>> Happy hacking!
>>    Gary


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3191 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2023-04-07 14:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.81.1677776445.12246.help-guix@gnu.org>
2023-03-05  8:44 ` Help-Guix Digest, Vol 88, Issue 4 Gottfried
2023-03-05 10:07   ` Wojtek Kosior via
2023-03-05 13:27     ` Gottfried
2023-03-06  1:35   ` Gary Johnson
2023-03-07 16:15     ` Gottfried
2023-03-08  1:58       ` 宋文武
2023-03-20  7:04     ` Gottfried
2023-03-21 14:42       ` Gary Johnson
2023-04-07 13:02         ` Gottfried
2023-04-07 14:31           ` Gottfried [this message]
2023-04-15  2:08             ` I am sorry " Tracker

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=b2fe5b8e-728b-f737-d906-9318af121b90@posteo.de \
    --to=gottfried@posteo.de \
    --cc=help-guix@gnu.org \
    --cc=lambdatronic@disroot.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.
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).