From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WKqvDH6lOWGDFwEAgWs5BA (envelope-from ) for ; Thu, 09 Sep 2021 08:11:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +NitCH6lOWENXgAA1q6Kng (envelope-from ) for ; Thu, 09 Sep 2021 06:11:10 +0000 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 3C0466D78 for ; Thu, 9 Sep 2021 08:11:09 +0200 (CEST) Received: from localhost ([::1]:60202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mODH8-0005Ev-Jd for larch@yhetil.org; Thu, 09 Sep 2021 02:11:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mODH4-0005DY-9f for guix-patches@gnu.org; Thu, 09 Sep 2021 02:11:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mODH4-0001Ud-1e for guix-patches@gnu.org; Thu, 09 Sep 2021 02:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mODH3-0000eq-Tp for guix-patches@gnu.org; Thu, 09 Sep 2021 02:11:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50296] [PATCH 0/2] Add 'guix home' command. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Sep 2021 06:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50296 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Oleg Pykhalov Cc: 50296-done@debbugs.gnu.org Received: via spool by 50296-done@debbugs.gnu.org id=D50296.16311678312487 (code D ref 50296); Thu, 09 Sep 2021 06:11:01 +0000 Received: (at 50296-done) by debbugs.gnu.org; 9 Sep 2021 06:10:31 +0000 Received: from localhost ([127.0.0.1]:33978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mODGZ-0000e2-Ew for submit@debbugs.gnu.org; Thu, 09 Sep 2021 02:10:31 -0400 Received: from mail-lj1-f175.google.com ([209.85.208.175]:33308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mODGU-0000do-V4 for 50296-done@debbugs.gnu.org; Thu, 09 Sep 2021 02:10:30 -0400 Received: by mail-lj1-f175.google.com with SMTP id s12so1274051ljg.0 for <50296-done@debbugs.gnu.org>; Wed, 08 Sep 2021 23:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=G4lVm6d+fnL42OXBeV7kHmCdKtzrpx7KSZFgMxuIMeM=; b=KBwyo2CY/ngS2nctG5OHqNvwdP/x2AXvRpuaRyZCEllRL+Lxz6G8Jc4RhNt/lOQ2Ch CoCu+jAp6f7EKuhBj4Quj4uND2nQKSwj6khi5zY/xtp8jRDYV9KuDRAQB4s7Pyjcw/3R 8BAvAdWui3Pjo3/xaoXOeuTztUO0ZpIYl9hspbepHJ6JkjbDKoWdw7e3v/Uv1YdBXN1h tGAPIH/G5Lbpy8Sop87lO64eA+bgArKarLLuoD/7pPhMumbuMVuP5mRF6FYEzSEHFH54 d4OISKhSk1vQM1EPkl++rIBa0/S5v5MCklvaa/7GUARy+nBpVGZtRfXApM0sowCYsOAF sQJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=G4lVm6d+fnL42OXBeV7kHmCdKtzrpx7KSZFgMxuIMeM=; b=EzOyJ4cCJpDfRumxqmQDEbjaxuc1CVl6xnJLULr+CrmzJiXwVe6pDlgrTtnNxE6Ots B5hOk6oZkZdGdRBsnTg679CWEvnW1M2TanFY5Fg9xaGlwsddd8UGPm7eDsWdZIROJRIZ nisFLBY/yIYAKwCHhb36I91Y1+a8SSneqhMBEiO2ZIFw8JESL6sQ+jiVVAzRHMiY8+Xq u92QorNqASRH9thELPihwuOa+qZpFWy9xJXz1dYCoehUX+qKmXYu2XZ1BUXTRUR/Hdp2 VpskBiCXnEWTkKJ1gMUO7W3W21xY/nQUaSNeJqZ8IHDefdoyyRx8hNeMxuP9U+FmMh/l uw8Q== X-Gm-Message-State: AOAM532RyyM10N4WKdKd+UUjZTLIEvT59uuKarT0o/Vr+MKst3TbJoHK ryV1koDVzwR4xfYf0QPbNU1nSQ== X-Google-Smtp-Source: ABdhPJzgD+P/LeShP3Q3c1962kvW24q2Ypv2KT2m8a6IUlnCVlZwY33eunFR5W8iTKuSWOi+EpI7/g== X-Received: by 2002:a2e:a486:: with SMTP id h6mr975141lji.208.1631167820818; Wed, 08 Sep 2021 23:10:20 -0700 (PDT) Received: from localhost ([109.252.93.92]) by smtp.gmail.com with ESMTPSA id m5sm90795lfk.267.2021.09.08.23.10.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 23:10:19 -0700 (PDT) From: Andrew Tropin In-Reply-To: <87pmtt8zh0.fsf@gmail.com> References: <874kb6j718.fsf@trop.in> <87tuj598an.fsf@gmail.com> <87sfypj0qk.fsf@trop.in> <87eea9ixx4.fsf@trop.in> <87pmtt8zh0.fsf@gmail.com> Date: Thu, 09 Sep 2021 09:10:16 +0300 Message-ID: <87ee9yuvnb.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631167869; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=G4lVm6d+fnL42OXBeV7kHmCdKtzrpx7KSZFgMxuIMeM=; b=JVrAI+OJKbomkCAdcqXo6jUsaX3urMywb/KyZpGQuYpXUu7uLeAgzkGBfe6Qrualo9lrY3 NCnUYIDjYr9mfUfp35OlJwoa8JAMV7QW2KTt/W1GNALqWI3UYmLnmGqXeW6/iYXTU2cBmg O5S+jSOgfbuMNZ7TGSxtunmEVwJgQUBqSXC6BFVkXY3n+j9dhmeuUwb8WsPywd7guicrsL bheas9Wh4bVPoY2KxJN+4RGRoJWVB68gJEwmNjZzE1aBbh4hdCdV5cwdDPQK12Wko9wrCu U1mK7zlQsELkbVQJlNmDlyVAN8+zxwkbWVDIDhSpI396d7pEMBSBY91rXq1auQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631167869; a=rsa-sha256; cv=none; b=iZ06DQ+W6pw0meopW+1L0HSGDoIYlHDlfqdiqyKOPaWe7Wj0E+kFPoTawfSKvjh3cwtuZL ACU0Nx3jJUYyPqhYubcBouqJKJdhDweAWuHLaUe+x30Aye0zqSo+3S5kbeatkkxR34g912 CxR3ZA7nC+6AKnYCeRGhpbRpT+E9TpijgKRO/2z1p6PLkUkzNS8x8LctphDqRVxkBlb2Qq Bc2Ei+gk3UOBdO7CViLHYe/dlFO35MJhWzChkligqaM/Tl3/yC/c3xGBTnNiw9TWYhG/aJ Gi+SpNm9S8b/ejTUVdYmzw2FspIlwE0g5w12MzEfslkM7LneqUByRKS5OYmcGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b=KBwyo2CY; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.51 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b=KBwyo2CY; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 3C0466D78 X-Spam-Score: -3.51 X-Migadu-Scanner: scn1.migadu.com X-TUID: aULOpElb/T/w --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-08-31 17:23, Oleg Pykhalov wrote: > Andrew Tropin writes: > > [=E2=80=A6] > >> The functions from home-services-utils used by xdg now in home-services >> utils: >> >> From efd3ea79905c12e2c1c594fa6b54cf62d741f92f Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Tue, 31 Aug 2021 15:40:07 +0300 >> Subject: [PATCH 2/2] home-services: configuration: Add >> generic-serialize-alist. >> >> * gnu/home-services/configuration.scm (generic-serialize-alist) >> (generic-serialize-alist-entry): New variables. > > As you said, no variables, but functions ;-) > > Also, we could join those functions in Git commit message with comma. > > Applied with changes above. > > [=E2=80=A6] > >>> run-on-change service doesn't handle the case, where the previous >>> generation doesn't exists. Fix should be pretty simple, will send a >>> patch once it done. Thank you for catching this) >>> >> >> The fix: >> >> From a07541380d412b33c504e5811776062af4e38582 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Tue, 31 Aug 2021 15:24:25 +0300 >> Subject: [PATCH 1/2] home-services: run-on-change: Handle first generati= on >> case. >> >> --- >> gnu/home-services.scm | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) > > [=E2=80=A6] > > Added Git changelog-like line. > > Applied. > > Pushed to wip-guix-home as 0c7bb26435513a61814d98af1c790e43a74afb6e. > > Oleg. I did a little better solution for the first generation case for on-change service. Added it as fixup commit, so it's necessary to rebase with --autosquash to get it melded in the right place. Can you also rebase the whole branch on the latest master and recreate it, please? I'll test it and will be preparing for merge. Probably will send a few more patches, but they should be minor. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-fixup-home-services-run-on-change-Handle-first-gener.patch Content-Transfer-Encoding: quoted-printable From=206f3ec7f6bb4a6f495c4b7f38fce7cb31d179097b Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Wed, 8 Sep 2021 08:15:35 +0300 Subject: [PATCH] fixup! home-services: run-on-change: Handle first generati= on case. =2D-- gnu/home-services.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gnu/home-services.scm b/gnu/home-services.scm index 5608c65175..9f1e986616 100644 =2D-- a/gnu/home-services.scm +++ b/gnu/home-services.scm @@ -439,7 +439,10 @@ with one gexp, but many times, and all gexps must be i= dempotent."))) (define expressions-to-eval (map (lambda (x) =2D (let* ((file1 (string-append (getenv "GUIX_OLD_HOME") "/" (ca= r x))) + (let* ((file1 (string-append + (or (getenv "GUIX_OLD_HOME") + "/gnu/store/non-existing-generation") + "/" (car x))) (file2 (string-append (getenv "GUIX_NEW_HOME") "/" (car = x))) (_ (format #t "Comparing ~a and\n~10t~a..." file1 file2)) (any-changes? (something-changed? file1 file2)) @@ -448,14 +451,14 @@ with one gexp, but many times, and all gexps must be = idempotent."))) (if any-changes? (cadr x) ""))) '#$pattern-gexp-tuples)) =20 =2D (if (and #$eval-gexps? (getenv "GUIX_OLD_HOME")) + (if #$eval-gexps? (begin (display "Evaling on-change gexps.\n\n") (for-each primitive-eval expressions-to-eval) (display "On-change gexps evaluation finished.\n\n")) (display "\ =2DOn-change gexps won't evaluated, disabled by service configuration or =2Dthere are no previos generations.\n")))) +On-change gexps won't be evaluated, disabled by service +configuration.\n")))) =20 (define home-run-on-change-service-type (service-type (name 'home-run-on-change) =2D-=20 2.33.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmE5pUgACgkQIgjSCVjB 3rBXVA/6Ajk69Fqoq3JAwlQ6MmwEZ0u7DUDFWnP+tOA3Jp23yvN4cShWrHBMCDJU MVTgms7BMGKGb1uO0Z91J3WVKDQxYwOHa8QFic/+DWtkhYkLHX1Twu2veLrCgnuu hzbSJGBr8glsSQFyScnYvA+bEXKVJvQh3vQ4RtU8ofAJUcDGrF9afFoGIbrLFF9w hzb+fv2Rk8gpaPzJH/BCNI50nyJxS2ZOevQTsb8EPQWnCsh5/GO0LD4Dj64qA73O GHm1eMaa+BkRDmNlwczmpxdfh60gL5Xykh5GQNIBMndEQlqr4j/KNLYoluS5En0O HzPbaJtlikeuzXQw9MQOw8lPKXG/oQs/2BJ3WYIGf1H5gtVarNt2MJb4wKfuHCI4 07ZtsH9SuF99L4raZIbU/g5ULqRFzR6BRM22zfu3Jp8eolOaYLdNl120ZlXNev5e jjZTTBuek5zJF3go7PtXtWvFg/7hCwis/uo+KkxWHFqnobENoMVM1+xAtiopTQBv Ik7s/C79s+8dz0pGi2FKfjifKJfvx82T4v4amnMbzIr3xhOelW0Lpo5RXceX7Zod 6aTDUhdjw+QCUBEeV7PPiq1XF/u4wPQPnUF0+EF142CBrhRLOW1nMChZPcSxIGhH bBNp/XSUJRvnB/vK/mffPQkCICUaaVAvWfag+aFie1JkFBqcgH0= =jLqQ -----END PGP SIGNATURE----- --==-=-=--