unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Tracker <tracker@disroot.org>
To: Gottfried <gottfried@posteo.de>
Cc: help-guix@gnu.org
Subject: Re: I am sorry Re: Help-Guix Digest, Vol 88, Issue 4
Date: Fri, 14 Apr 2023 22:08:22 -0400	[thread overview]
Message-ID: <87wn2drio0.fsf@disroot.org> (raw)
In-Reply-To: <b2fe5b8e-728b-f737-d906-9318af121b90@posteo.de>

Gottfried <gottfried@posteo.de> 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
somehow.

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:

```update-profiles.sh
#!/bin/sh

GUIX_MANIFESTS=$HOME/sys/guix/manifests
GUIX_PROFILES=$HOME/sys/guix/profiles

for dir in $GUIX_PROFILES/*
do
    name=$(basename "$dir")
    manifest=$GUIX_MANIFESTS/$name.scm
    profile=$dir/$name
    if [ -r $manifest ]
    then
        guix package --manifest="$manifest" --profile="$profile"
    fi
    unset profile
    unset manifest
    unset name
done
```

```activate-profiles.sh
#!/bin/sh

GUIX_PROFILES=$HOME/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
```

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,
  Gary

-- 
GPG Key ID: C4FBEDBD
Use `gpg --search-keys tracker@disroot.org' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


      reply	other threads:[~2023-04-24  5:10 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           ` I am sorry " Gottfried
2023-04-15  2:08             ` Tracker [this message]

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=87wn2drio0.fsf@disroot.org \
    --to=tracker@disroot.org \
    --cc=gottfried@posteo.de \
    --cc=help-guix@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.
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).