From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OI28BRclo2TFGQAASxT56A (envelope-from ) for ; Mon, 03 Jul 2023 21:44:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uBfaBRclo2Q5TAAA9RJhRA (envelope-from ) for ; Mon, 03 Jul 2023 21:44:23 +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 27BD413AC8 for ; Mon, 3 Jul 2023 21:44:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGPSv-0002ME-JQ; Mon, 03 Jul 2023 15:44:05 -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 1qGPSt-0002KH-0y for bug-guix@gnu.org; Mon, 03 Jul 2023 15:44:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGPSs-0008RK-OI for bug-guix@gnu.org; Mon, 03 Jul 2023 15:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qGPSs-0003KV-4U for bug-guix@gnu.org; Mon, 03 Jul 2023 15:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#64358: =?UTF-8?Q?=E2=80=9Cguix_?= =?UTF-8?Q?refresh=E2=80=9D?= chokes on cran.scm Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 03 Jul 2023 19:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64358 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 64358@debbugs.gnu.org Cc: ludo@gnu.org Received: via spool by 64358-submit@debbugs.gnu.org id=B64358.168841339012730 (code B ref 64358); Mon, 03 Jul 2023 19:44:02 +0000 Received: (at 64358) by debbugs.gnu.org; 3 Jul 2023 19:43:10 +0000 Received: from localhost ([127.0.0.1]:34534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGPS1-0003JG-Vh for submit@debbugs.gnu.org; Mon, 03 Jul 2023 15:43:10 -0400 Received: from sender3-of-o58.zoho.com ([136.143.184.58]:21824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGPS0-0003J6-3H for 64358@debbugs.gnu.org; Mon, 03 Jul 2023 15:43:09 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1688413373; cv=none; d=zohomail.com; s=zohoarc; b=nvZJKOwe9LgKnapTAqnQjlJI35PjWFIE990CVlkLWDoFQ1t2MwjnPphIDo/4yvyCru5/hQeRQGsmLaI0CamohSjozgm5eM1GGVX61ZajDZqN4t2KPBJbdumAIoZQ8ZZRXkquIOWqATJzGDxRkuan7CdHmxvQeYKVs/4QLI+HCQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688413373; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=PY0L1jGYRR5XUvB/Ub+i/u567cq3YMXLjAdMfPPeNNc=; b=EEoR6P8NfYLCghmaeh148+ok+rwEOhlP7+PNImjRqULtZqqHQbRKgMd0pe+0RCo+8e7TdknfBrUbhV5cw6l6JLtCok9pirPFioEMLG5Bws3VtOiL+Vd8xV9KQ4IRFpETQ3jpEzA6EWUgrwT9Q3dNamWjrXU5bzjjPkyHguv7vXE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1688413373; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=PY0L1jGYRR5XUvB/Ub+i/u567cq3YMXLjAdMfPPeNNc=; b=PnhaPOn0WodraylC9K3UBqiGAIycgq1YnN3fT+7kcRZQjxuglWv7y1kcL9cPkyjL 8p5QnZHRsow3leP9NQuiGMFHuWMZGZ4wJnQlo19rd4DCjbBScpAQBIZJqGlZSSja6ut 3hVtFS4/cfFLedjSatklF4cFSBRUatLEkXcSLWZs= Received: from localhost (45-110-142-46.pool.kielnet.net [46.142.110.45]) by mx.zohomail.com with SMTPS id 1688413371672103.3891389990589; Mon, 3 Jul 2023 12:42:51 -0700 (PDT) References: <87bkgyklbv.fsf@elephly.net> User-agent: mu4e 1.10.3; emacs 28.2 From: Ricardo Wurmus Date: Mon, 03 Jul 2023 21:29:09 +0200 In-reply-to: Message-ID: <87r0pou6h3.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688413463; 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: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=PY0L1jGYRR5XUvB/Ub+i/u567cq3YMXLjAdMfPPeNNc=; b=TMsvlCiYhNhy30Zyn3w4j3TO4IayUGdFizhKJ+ZAADxESNoyAzcd/17qVHFh8cy7SrPPj7 gMkONZUowcn80qUlUIreEZBHLgiVLLXiZN364Z0e2z2FJDG6hIRXRdVhNTY4MvIbcehd7K HmEMI++ZtALsP7bVBnabt9gsvN0E5+7xvnYZGZ532qTvmta7vO927K3UGsSO1tkSlYnNTQ c67ldwJUqGqU1msksppmCZiR8ggZfb/C/4UvC9iACwffEVduwW4sfL63oE6voMNrR+8QX3 zHYS1dHCGzHry+2VvOGrLBs89kelJZBoaCNm4yPToHXdodvFGlWeCuqIiSg5lA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=PnhaPOn0; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1688413463; a=rsa-sha256; cv=fail; b=H+vE+s7uKlJjqsWT4Xa+l7dbUaxSsoClDQGBzkQjv0VLR7jZY0WuUwXk31POiEHnxQa2xA Zm6Rwyq0DcHvGKlxC7OCF+z9g0XfZPETGSVCEl8q9F5ZrQyzp0BrSKz1sBA4bZK4DPE0B+ tZDqrHppV4Y7vzlUh+lrnAmKKD0lW7od5J7Nk0iP5zfICv/c2ddHmvErBr2piUAUQfph/U wPxQREUHP3c4fG985jN39sSA9TQSzOy/5B+I0ir0oak3hyZ1cxRn+EG3eA5bCagTedQn+v uzchZ90WYEkfHXHXilGvbNv0W2tKmRL7oX39Qtly+KrZQxhAUo4lMH9ky5g/mg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 0.24 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=PnhaPOn0; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}") X-Migadu-Queue-Id: 27BD413AC8 X-Spam-Score: 0.24 X-TUID: SKV/KW3v63IW > Prior to that we see warnings like this: > > /home/rekado/dev/gx/branches/master/gnu/packages/cran.scm:36350:2: r-read= text: updating from version 0.82 to version 0.90... > /home/rekado/dev/gx/branches/master/gnu/packages/cran.scm:36350:2: warnin= g: r-readtext: no `version' field in source; skipping > > It=E2=80=99s as if the position in the file has been lost and it tries to= update > the definition of r-readtext that is no longer where the current port > position is. It seems that this is indeed the problem. The value for a =E2=80= =99s =E2=80=9Clocation=E2=80=9D field is known at compile/eval time and this val= ue will not be correct after the first substantial edit has taken place. I see these options: 1 - pass a value to =E2=80=9Cupdate-package=E2=80=9D that corresponds to li= ne changes so far and let it return an updated value, making =E2=80=9Cupdate-package=E2= =80=9D aware of file changes. This would be rather ugly. 2 - compute the location of the target package anew if the file it is located in has since been edited. 3 - never rely on the line number of the package location value; just open the specified file and always search it for a package definition. Optionally take the line number into account as a starting point for a search in both directions. 4 - integrate changes with git, so that all edits are commits that are applied to the very same base commit. The third option seems the most reasonable and lightweight to me. --=20 Ricardo