From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uErUD5XGRmRUCQEASxT56A (envelope-from ) for ; Mon, 24 Apr 2023 20:12:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UG3YD5XGRmQROwAA9RJhRA (envelope-from ) for ; Mon, 24 Apr 2023 20:12:37 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E80662E12 for ; Mon, 24 Apr 2023 20:12:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pr0ff-00060j-1K; Mon, 24 Apr 2023 14:12:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr0fW-00060D-GV for help-guix@gnu.org; Mon, 24 Apr 2023 14:12:06 -0400 Received: from koszko.org ([93.95.227.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr0fS-0001yY-BR for help-guix@gnu.org; Mon, 24 Apr 2023 14:12:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=symjYbbIK2NWhUhPj1nTBbEsHPTKc7IVpP7ClxZEkl0=; b=FlvGLiVlhYC0qQCWYEKtMWJbmL tFMxdtVU1VR+iK/4siy3s6FUj/ygLNNgYcGmDKyMG8zfGLzeHbRnBXZ/vGsQua/rMKs1dE/pf28EI ap/RaOrU7orIqP+MANbDZ/Br1SN0JnjScf7SmkK0+eA1Ha3P5dQBRYmbwAZtadLdRLhp4KTUqkooS WGs4O0URWqk6XP8Bk0K0x6oJcbYxbBChtVXx7zAKfepjZAao7lJf/9HCc6dqJ4Zm9yX3RaLDV9Jgs qBw3egW+6l06HshtKA0GJwHIW70jZ0caUNZCNhscPwjiwcj69Mn/nAihDjVjd7lwX8hVq6K8CVXrp QV7kkySaMG9bwTtCtHtZnBpVNmQy4BM4+S/rRZcSFtUMlSbgb3hJSQ+nc8eAzJ6glJvrwQszSIJJA py3g3GtaafDw4usDctVppGcKb2wpNX7QQ8PwGPr+hYXHvTTxKdK4UlRreMkAH7TWyFLNX9P/xJ6SB at5BxYVwD/q2MehkpbCho4YJWwr7jmVopg7R/jcH0pkzrGazuhyuMQe+iJDgCl3AtqgRvhgYDRPve EpS9noHhpm8/ZoEB2eKsQd3zR7yWwL4Kwuhf3r54QsS65L9g64aKjHacdwFF80AcHnVqrxVD/Nkrp vi5SEW8juCn9L1IiESx1gEqyJ3868AkcIOw11GcK4=; Received: from [77.252.47.194] (helo=koszkonutek-tmp.pl.eu.org) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pr0fO-0002x1-3d; Mon, 24 Apr 2023 20:11:58 +0200 Date: Mon, 24 Apr 2023 20:11:55 +0200 To: Gottfried Cc: Gary Johnson , help-guix@gnu.org Subject: Re: update-profiles.sh Message-ID: <20230424201155.35dcfbc0.koszko@koszko.org> In-Reply-To: References: <20230424140548.41fb9f7b.koszko@koszko.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/LIu.1/_CMe_vYu8U9vBSXIX"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=93.95.227.159; envelope-from=koszko@koszko.org; helo=koszko.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Wojtek Kosior From: Wojtek Kosior via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682359957; a=rsa-sha256; cv=none; b=aBRB+vnZw0Lfa5I4SWAkWUaAqFfXNyMYoWrXXe1qXiS/BRq0hQzOT+jmua7WgiNPZEbyup w04lE88dz+oZWO3UqbC79Z/NrHg6+xYJ6QBJxephRJfRrgtMvsju2geQZ/YSjr+wreqoA8 b0JTW6PzbkfSM8/FUcSuzC8cc1WVBfwAB7jaCHi49zrpuEv4gdF5J6KM6CpOcMwNef7wh7 cZUEj7zTYsiQoVYgci2qA19Te3ffw8kOSv56FGx88WW4QqECl3NZkamwlpb8voIWP4gmaK YbtXk2Veyuaqo1dIXa+z99FPRdYg/7Y1ZgP9P7R3lJfM2rVl3azdHcCHgPKqJA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=FlvGLiVl; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682359957; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=symjYbbIK2NWhUhPj1nTBbEsHPTKc7IVpP7ClxZEkl0=; b=br04zZrICONPEWFujCT5CHh0ZHTlGFjDgcdZJrXN/6+RyE9bGNbOH53kic8OmOCpAu5xvG FXgWeewCxTa40uyYoP7ocZ7QjSsdNAZymi/vAMS0Ys2zy+ffmLeUnhwmZ0RCDlL1JKiaj0 uVLRFSH49zT6Td9z8azAcamHVtFIlmNppobfU8wcgm1qatTnuCB17zslYLhZ4pqvLzhply fZMIq8s1bVrC0HgIQp99CcWYcqJAUb53yNn1GEWp2FpxHT3r5uW32hjSkxus14MFw5PFTz 8m0aIhQD1p2BjeIGS5kjmqZC+4EXLuVAvOslfVM3Rp31AOvOgjfZsdNn3t1xaw== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=FlvGLiVl; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.11 X-Spam-Score: -4.11 X-Migadu-Queue-Id: E80662E12 X-TUID: w/epUgFrk+AI --Sig_/LIu.1/_CMe_vYu8U9vBSXIX Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > Hi, > thanks for help >=20 > I tried this script in the terminal. >=20 > 1. > gfp@Tuxedo ~$ ./update-profiles.sh >=20 > it said > guix package: Error: Profile /home/gfp/Projects/Calibre/calibre is=20 > locked by another process >=20 > I didn=E2=80=99t open calibre, so what could be the problem? Oooops, there's probably been a mistake. Looking at your emails from an older thread, it seems your profile paths were like "/home/gfp/Projects/Calibre/guix-profil" and "/home/gfp/Projects/Musik/guix-profil". Is that correct, is there "guix-profil" at the end of every profile path? And here, with this script, I erroneously assumed profile paths like "/home/gfp/Projects/Calibre/calibre" and "/home/gfp/Projects/Musik/musik". I apologize :( We need to adapt the script to use the correct profile paths. I think you could use something like ``` #!/bin/sh GUIX_PROFILES=3D$HOME/Projekte for dir in $GUIX_PROFILES/* do name=3D"$(basename "$dir" | tr '[:upper:]' '[:lower:]')" manifest=3D"$dir"/"$name".scm profile=3D"$dir"/guix-profil if [ -r $manifest ] then guix package --manifest=3D"$manifest" --profile=3D"$profile" fi done ``` Also, the script I prepared previously probably created some extraneous profiles at the paths it was trying to use. Again, sorry if this happened. You might want to remove the extra profiles you'll find. Good luck, Wojtek -- (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 =E2=99=A5 R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ=3D=3D | =C3=B7 c2luIHNlcGFyYXR= lZCBtZSBmcm9tIEhpbQ=3D=3D =E2=9C=9D YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ=3D=3D | ? U2hhbGwgSSBiZWNvbWUg= SGlzIGZyaWVuZD8=3D -- (sig_end) On Mon, 24 Apr 2023 15:42:38 +0000 Gottfried wrote: > Hi, > thanks for help >=20 > I tried this script in the terminal. >=20 > 1. > gfp@Tuxedo ~$ ./update-profiles.sh >=20 > it said > guix package: Error: Profile /home/gfp/Projects/Calibre/calibre is=20 > locked by another process >=20 > I didn=E2=80=99t open calibre, so what could be the problem? >=20 >=20 > 2. it installed almost all packages from all profiles > without icecat, probably because I had it opened. >=20 > 3. It did not install my "Musik" profile with several packages. > is locked by another process >=20 > I am not sure about that, because I haven't opened any of those packages. >=20 >=20 > So we have success. > Thank you very much. > You saved me a lot of time and headache. >=20 >=20 > Kind regards >=20 > Gottfried >=20 >=20 > > #!/bin/sh =20 > >>=20 > >> GUIX_PROFILES=3D$HOME/Projekte > >>=20 > >> for dir in $GUIX_PROFILES/* > >> do > >> name=3D$(basename "$dir" | tr '[:upper:]' '[:lower:]') > >> manifest=3D"$dir"/$name.scm > >> profile=3D$dir/$name > >> if [ -r $manifest ] > >> then > >> guix package --manifest=3D"$manifest" --profile=3D"$profile" > >> fi > >> done =20 >=20 >=20 >=20 > Am 24.04.23 um 14:05 schrieb Wojtek Kosior: > > Hi Gottfried, > >=20 > > I see several problems with `update-profiles.sh`. > > - You wrote `GUIX_PROFILES=3Dhome/gfp/Projekte`, without leading slash. > > This makes the shell treat this path as a relative one. You need to > > use either `/home/gfp/Projekte` or just '$HOME/Projekte'. > > - This script assumes manifests to be stored in a completely different > > place than they really are in your case. > > - There's no need to `unset` the loop variables at every iteration. At > > least as long as this script is executed and not sourced. I'm > > mentioning this although a few extraneous `unset`s are not going to > > cause problems. Don't worry too much about this. > >=20 > > I edited the script. Try with this version > >=20 > > ``` > > #!/bin/sh > >=20 > > GUIX_PROFILES=3D$HOME/Projekte > >=20 > > for dir in $GUIX_PROFILES/* > > do > > name=3D$(basename "$dir" | tr '[:upper:]' '[:lower:]') > > manifest=3D"$dir"/$name.scm > > profile=3D$dir/$name > > if [ -r $manifest ] > > then > > guix package --manifest=3D"$manifest" --profile=3D"$profile" > > fi > > done > > ``` > >=20 > > -- (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 > >=20 > > =E2=99=A5 R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ=3D=3D | =C3=B7 c2luIHNlcGF= yYXRlZCBtZSBmcm9tIEhpbQ=3D=3D > > =E2=9C=9D YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ=3D=3D | ? U2hhbGwgSSBiZWNv= bWUgSGlzIGZyaWVuZD8=3D > > -- (sig_end) > >=20 > >=20 > > On Mon, 24 Apr 2023 11:22:46 +0000 > > Gottfried wrote: > > =20 > >> Hi, > >> > >> Sorry, > >> you provided me already with a script for activating all profiles at l= ogin, > >> I don=E2=80=99t know at the moment, why I have mixed it up with other = things > >> and I didn=E2=80=99t use it. > >> ------------------------------------------------------------ > >> in the meantime all packages are available at login > >> through the help of Martin > >> ------------------------------------------------------------ > >> > >> so I tried to use your "update-profiles.sh" > >> I placed it in my home directory: ~/gfp > >> and changed one sentence, my the place of the profiles: > >> > >> update-profiles.sh > >> > >> #!/bin/sh > >> > >> GUIX_MANIFESTS=3D$HOME/sys/guix/manifests > >> GUIX_PROFILES=3Dhome/gfp/Projekte > >> > >> for dir in $GUIX_PROFILES/* > >> do > >> name=3D$(basename "$dir") > >> manifest=3D$GUIX_MANIFESTS/$name.scm > >> profile=3D$dir/$name > >> if [ -r $manifest ] > >> then > >> guix package --manifest=3D"$manifest" --profile=3D"$profile" > >> fi > >> unset profile > >> unset manifest > >> unset name > >> done > >> > >> ------------------------------------------------- > >> > >> but running it, it seems not doing anything. > >> > >> sometimes it=E2=80=99s difficult for me, to know so little, not knowin= g what I > >> have to do, not knowing the basics ... > >> > >> Is it connected with the other script to activate the profiles at logi= n? > >> so that it doesn=E2=80=99t work? > >> I guess both scripts are independent. > >> > >> or is the path to it wrong? > >> I have the directory > >> ~/gfp/Projekte > >> > >> and in it many directories/which are the different profiles, e.g: > >> Musescore, Musik, Emacs, Calibre, Gnucash, Icecat, Libreoffice, > >> Photoflare, Lilypond > >> > >> and in each of these directories a scm.file with the same name but in > >> small letters like: musescore.scm, musik.scm, emacs.scm ... > >> > >> > >> > >> Kind regards > >> > >> Gottfried > >> =20 > >>> 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=3D$HOME/sys/guix/manifests > >>> GUIX_PROFILES=3D$HOME/sys/guix/profiles > >>> > >>> for dir in $GUIX_PROFILES/* > >>> do > >>> name=3D$(basename "$dir") > >>> manifest=3D$GUIX_MANIFESTS/$name.scm > >>> profile=3D$dir/$name > >>> if [ -r $manifest ] > >>> then > >>> guix package --manifest=3D"$manifest" --profile=3D"$profile" > >>> fi > >>> unset profile > >>> unset manifest > >>> unset name > >>> done > >>> ``` > >>> > >>> ```activate-profiles.sh > >>> #!/bin/sh > >>> > >>> GUIX_PROFILES=3D$HOME/sys/guix/profiles > >>> > >>> for dir in $GUIX_PROFILES/* > >>> do > >>> name=3D$(basename "$dir") > >>> profile=3D$dir/$name > >>> if [ -f "$profile"/etc/profile ] > >>> then > >>> GUIX_PROFILE=3D"$profile" > >>> . "$GUIX_PROFILE"/etc/profile > >>> export MANPATH=3D"$GUIX_PROFILE/share/man${MANPATH:+:}$MANPA= TH" > >>> export INFOPATH=3D"$GUIX_PROFILE/share/info${INFOPATH:+:}$IN= FOPATH" > >>> 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 =20 >=20 >=20 --Sig_/LIu.1/_CMe_vYu8U9vBSXIX Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCZEbGawAKCRBLxSIcWnn9 GphkAP94ctDbWmLecOOXCGjHapkKEkyD9k7JMjTQz9Yi9zfWhQD/eIqUyEcqTAZT kGWoDXwwNNtZEDPq9n+gu2cp+X4q2w4= =aOaH -----END PGP SIGNATURE----- --Sig_/LIu.1/_CMe_vYu8U9vBSXIX--