From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yK81DKY5OWG8UwAAgWs5BA (envelope-from ) for ; Thu, 09 Sep 2021 00:31:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oB6PB6Y5OWGoJwAA1q6Kng (envelope-from ) for ; Wed, 08 Sep 2021 22:31:02 +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 B5CF8672F for ; Thu, 9 Sep 2021 00:31:01 +0200 (CEST) Received: from localhost ([::1]:38032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mO65s-0005sg-PI for larch@yhetil.org; Wed, 08 Sep 2021 18:31:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO65c-0005sW-Nr for guix-devel@gnu.org; Wed, 08 Sep 2021 18:30:45 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:34672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mO65Z-0003LC-Bi; Wed, 08 Sep 2021 18:30:44 -0400 Received: by mail-wr1-x433.google.com with SMTP id m9so5530323wrb.1; Wed, 08 Sep 2021 15:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=0L5dnWQK3WKdiZKfubFHl1pFjunqU/5yBIUPTYN8fSw=; b=k4qFCAUJ7yd608s8BYFhss75WlOIp02H8YXGJ8w2bSYrkHj6YDTIPk5vGp4Xt/OHvU BRXVxvEYDgTbulYsqhl71IXRkVYy0zy/i0fA9i8AYfsC2ccS4qQm1W8uyCvyh0cWSYaY 61W31tBAuBuYeRcmKF83AIAZDSdpxs1fo/Q2yUB5Ly19mMlYGKRh0YFR0vU9VYftgRSV dDFIin9z/JU6+I+3a624uIzXCJBZ55SsF3PSSHOZ2en4BYEFFErKoVXlKRDNcBqnyejq AjwQ9LLbPEwVTXdaoeK2gABXyGvE/zNDlKa6Se6EF55xkx42pGubP3HUGImoW4cFzqf3 Iyfg== 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:content-transfer-encoding; bh=0L5dnWQK3WKdiZKfubFHl1pFjunqU/5yBIUPTYN8fSw=; b=17TMSGhThGyi/OhIbOVU3k+zWM5YgnDcGmhXWKNLggGHEyAe294XSEgf8FFQFUSLK5 Lvri2R2rtC3GLci7q2LwiwaxmNg+XJxvKSDYa4d2ww+c4LpXO0AVgoOqEOqSlyRe7qdL xQXQ60IAiHZwmouqS2M3XRE02OPneYK84ejRmmWv4sgjwe+UGFwcOa6bWuy4knYeiP8x ypXF50x9H7bwnUeAwsIq0dp052jei2GFeR2YFkxQbav3JQbNa+dGA81h8DdoIycquAyT Wre5p7lS7iwuxRlfw5yEL/nWWxdEstWJoCy/pW5l+vTpWsWE4xydNP+GYCNZUkr5/+G9 Uiew== X-Gm-Message-State: AOAM530xSO7wyKHszsnUg3bcBw0KunfZ4KPNtWe4YP8lji9ZcsgtjmCD 5gSlvc314ei8dSvrOW2J2BQV/MjIn6I= X-Google-Smtp-Source: ABdhPJxtOy1AzZaor1Oo8j3fJS6NAZU20JKSkjFP3UHKCXs2WfQen5JfTNZwRN64P62faeB5Js3YlQ== X-Received: by 2002:adf:eb4a:: with SMTP id u10mr552036wrn.11.1631140238164; Wed, 08 Sep 2021 15:30:38 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id j25sm403096wrc.12.2021.09.08.15.30.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 15:30:37 -0700 (PDT) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Transform options: check if applied or not In-Reply-To: <8735qe23el.fsf@gnu.org> References: <86pmu1qz2f.fsf@gmail.com> <87a6kv5m1q.fsf@gnu.org> <8735qe23el.fsf@gnu.org> Date: Thu, 09 Sep 2021 00:29:18 +0200 Message-ID: <8635qeaegx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x433.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, WEIRD_QUOTING=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "guix-devel@gnu.org" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631140261; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=0L5dnWQK3WKdiZKfubFHl1pFjunqU/5yBIUPTYN8fSw=; b=tw3YTGd+pjah2gSRASDUGq9z32/w/cFATGJAnpx2jx64EO1vCzKzltoQnDiuu/DvMEnp/a hLmWai3iD2z9MROiQ6ASpg0EE7UTlQY7BrO6PLTd8NQAboEG3iU6VfxvqCtaqwFIIUlW7B sRiRuIGFBOWnohacCWfEpXTfRTod2++X4XGU3vmy2rsb7Q3Y/jNlJbITeU9kC3JfRB9l5U vJKrMoue5uz7v7s7utgX9dZv+UmyAV4HiTFIcKE77EkgR/MKl00xMfLQyCybeEmNpfSHmw U40Al/EAW+O2QbYgI8OeeP01Qifc/6slLErPxWdUXcK/pI3IBuwPHrb8Ud3BRA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631140261; a=rsa-sha256; cv=none; b=ootp+GSgthT8E2+icomr2scoAmcCXUICZw1Igg+BJwF5tJuul/UeUy2nVrDTU9DXo32F4k eg48nrU3f1TIY+r32UnlSTIm97LNIRbXgT0R/8gIhsXRjpuMlTmXK506hsfXGwIg8i22J2 +u5eHQAawl4vCkvZaAV4Lv0MeH6p1EIo8nE9fG2Ei5QLENUzV9/GjUmcIz0A1NyxLtdmHX hvDKX479lysPOH4wB9vMVRxgz35XeutKBj4oOHm1gVxx4cka50uwW71RYNBhCjxCxhRAG3 xMUnrcH7E+sXcdAyRKmQGh6Fr5lUN1qzfrD3BYZdU/0I7Dv1+87hoWNrKt320g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=k4qFCAUJ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=k4qFCAUJ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: B5CF8672F X-Spam-Score: -1.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3kc2RqJPkTZ2 Hi Ludo, This thread is initially about 2 issues: 1) apply a transformation to a non-existent package, 2) check if the transformation makes sense or not. Here, I will comment only about #2. On Wed, 08 Sep 2021 at 22:55, Ludovic Court=C3=A8s wrote: >> The other issue is to list if the transformation is applied or not. I >> think it is possible by traversing again the graph and check if a >> property appears at least once; well it should be better to warn if >> the 'mapping-property' is not found at least once. I had some >> headaches to implement it... and I moved to other "urgent" stuff. :-) > > Hmm the =E2=80=98mapping-property=E2=80=99 is not enough. I think you pr= etty much have > to compute the derivations of the new and old packages and compare them. >From my understanding, the transformation can replace something and then return a new package but this new package can be the same as the old one. I agree that the detection of such cases requires to compute the both derivation=E2=80=93=E2=80=93which is probably too expensive / complex,= IMHO. However, the transformation might replace nothing and so it is sure that the new and old packages are the same. :-) Other said, a) there is no guarantee that if the new graph contains a least one replacement then the new package is different than the old one. But, b) there is a guarantee that if the new graph does not contains any replacement, then for sure the new package is the same than the old one. For instance, a) guix build hello@2.10 --with-source=3Dhello=3Dhttps://ftpmirror.gnu.org= /gnu/hello/hello-2.10.tar.gz b) guix build hello@2.10 --with-latest=3Dpython-scipy and it would be nice to warn for the case b-. After digging again in the code, the =E2=80=99mapping-property=E2=80=99 is probably not the right = way, even if a =E2=80=99properties=E2=80=99 could be added when the rewrite happens and = this =E2=80=99properties=E2=80=99 can be checked at the end of the traversal. W= DYT? Cheers, simon Well well, I miss a point: --8<---------------cut here---------------start------------->8--- $ guix build hello@2.10 --with-source=3Dhello=3Dhttps://ftpmirror.gnu.org/g= nu/hello/hello-2.10.tar.gz /gnu/store/zfwhbbknkhxi3yqmp0qgh1l1crljgbm6-hello-2.10 $ guix build hello@2.10=20 /gnu/store/a462kby1q51ndvxdv3b6p0rsixxrgx1h-hello-2.10 --8<---------------cut here---------------end--------------->8--- Where https://ftpmirror.gnu.org/gnu/hello/hello-2.10.tar.gz is an official mirror. It was expecting the same store item so why not a different one. It is because the derivations are different. The first call contains the source tarball as an =E2=80=9Cinput=E2=80=9D; that=E2=80=99s fine. The= second call contains the source tarball as a derivation; again that=E2=80=99s fine. The corresp= onding first and second derivations are: --8<---------------cut here---------------start------------->8--- Derive ([("out","/gnu/store/zfwhbbknkhxi3yqmp0qgh1l1crljgbm6-hello-2.10","","")] ,[("/gnu/store/101ny738l311p4fm3cas7jgnkzagjv6a-module-import-compiled.drv= ",["out"]) [...] ,("/gnu/store/z4s27gwacbw8f38andfsh21r8v330dag-xz-5.2.4.drv",["out"])] ,["/gnu/store/8a0wry8cvr405ha8d8bpjyzj5dzghigd-module-import", "/gnu/store/chariqd6k0sli3s7vcl4q3al0crirz5v-hello-2.10.tar.gz", "/gnu/store/rndq9g8877l29ha41dvsl3aj1z0gw0ng-hello-2.10-guile-builder"] [...] --8<---------------cut here---------------end--------------->8--- and --8<---------------cut here---------------start------------->8--- Derive ([("out","/gnu/store/a462kby1q51ndvxdv3b6p0rsixxrgx1h-hello-2.10","","")] ,[("/gnu/store/101ny738l311p4fm3cas7jgnkzagjv6a-module-import-compiled.drv= ",["out"]) ,("/gnu/store/1a7xfcqcxj0pqi4f81x1agcxa46v2bbm-hello-2.10.tar.gz.drv",["= out"]) [...] ,("/gnu/store/z4s27gwacbw8f38andfsh21r8v330dag-xz-5.2.4.drv",["out"])] ,["/gnu/store/8a0wry8cvr405ha8d8bpjyzj5dzghigd-module-import", "/gnu/store/kql8b2hbsabcmany4m3hfm3wzdiymliy-hello-2.10-guile-builder"] [...] --8<---------------cut here---------------end--------------->8--- Therefore, I understand why the two store items have different hashes. What puzzled me are the corresponding =E2=80=99guile-builder=E2=80=99s: --8<---------------cut here---------------start------------->8--- (define %build-inputs (quote (("source" . "/gnu/store/chariqd6k0sli3s7vcl4q3al0crirz5v-hello-2.10.t= ar.gz") --8<---------------cut here---------------end--------------->8--- and --8<---------------cut here---------------start------------->8--- (define %build-inputs (quote (("source" . "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.t= ar.gz") --8<---------------cut here---------------end--------------->8--- but these 2 items have the same hash: --8<---------------cut here---------------start------------->8--- $ guix hash /gnu/store/chariqd6k0sli3s7vcl4q3al0crirz5v-hello-2.10.tar.gz 0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i $ guix hash /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz 0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i --8<---------------cut here---------------end--------------->8--- Why? It is fixed-output so I was expecting the same thing. And the same as: --8<---------------cut here---------------start------------->8--- $ guix download https://ftpmirror.gnu.org/gnu/hello/hello-2.10.tar.gz Starting download of /tmp/guix-file.qkhxkp >From https://ftpmirror.gnu.org/gnu/hello/hello-2.10.tar.gz... following redirection to `https://mirrors.sarata.com/gnu/hello/hello-2.10.t= ar.gz'... =E2=80=A610.tar.gz 709KiB 549Ki= B/s 00:01 [##################] 100.0% /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz 0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i --8<---------------cut here---------------end--------------->8--- Why the store item of source tarball is it different when applying the transformation?