[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I am sorry Re: Help-Guix Digest, Vol 88, Issue 4

From: Tracker
Subject: Re: I am sorry Re: Help-Guix Digest, Vol 88, Issue 4
Date: Fri, 14 Apr 2023 22:08:22 -0400

Gottfried <> writes:

> 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?

No, I think you misunderstood me.

I have multiple packages in each of my profiles. This is fine. I would
not make one profile per package. That seems like an abuse of the system

The point of a profile is to create an environment in which a particular
group of packages is installed. That's it.

By default, each user on Guix System has one user profile. All packages
that they install are placed into it. This is easy to manage. Some
people (like myself) choose to create additional profiles. Many people
do this in order to separate out a group of packages that they don't
want installed (or upgraded) all the time. I do it because occasionally
one of my packages breaks when I am upgrading my system. By splitting
all of my packages up into a few different profiles by category, if one
package fails to upgrade, then that profile doesn't upgrade, but all of
my other profiles do. This allows me to install the newest software for
everything outside of the broken profile. Then I focus on fixing the
broken package and just upgrade the broken profile. Easy peasy.

> 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.

I believe I already provided you with the code for updating profiles and
activating them, but here it is again for reference:



for dir in $GUIX_PROFILES/*
    name=$(basename "$dir")
    if [ -r $manifest ]
        guix package --manifest="$manifest" --profile="$profile"
    unset profile
    unset manifest
    unset name



for dir in $GUIX_PROFILES/*
    name=$(basename "$dir")
    if [ -f "$profile"/etc/profile ]
        . "$GUIX_PROFILE"/etc/profile
        export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH"
        export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH"
    unset profile
    unset name

These scripts both loop over my manifests or profiles directories,
running the upgrade or activate commands on each one. If you want to
exclude a profile from being upgraded with this script, you can just
take away its manifest's read permissons like so:

chmod -r $HOME/sys/guix/manifests/my-excluded-manifest.scm

Good luck,

Use `gpg --search-keys' to find me
Protect yourself from surveillance:
()  ascii ribbon campaign - against html e-mail
/\   - against proprietary attachments

Why is HTML email a security nightmare? See

Please avoid sending me MS-Office attachments.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]