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 ms5.migadu.com with LMTPS id 6CYNKimMi2Ka7QAAbAwnHQ (envelope-from ) for ; Mon, 23 May 2022 15:29:13 +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 4QziKSmMi2LofQEA9RJhRA (envelope-from ) for ; Mon, 23 May 2022 15:29:13 +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 46F20EBCF for ; Mon, 23 May 2022 15:29:13 +0200 (CEST) Received: from localhost ([::1]:39554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nt87T-0007Gc-Rr for larch@yhetil.org; Mon, 23 May 2022 09:29:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nt87K-0007Ff-4S for bug-guix@gnu.org; Mon, 23 May 2022 09:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53767) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nt87J-0007Qu-SN for bug-guix@gnu.org; Mon, 23 May 2022 09:29:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nt87J-0007M1-Q7 for bug-guix@gnu.org; Mon, 23 May 2022 09:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55139: package-location is wrong for transformed packages Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 23 May 2022 13:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55139 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: 55139@debbugs.gnu.org Received: via spool by 55139-submit@debbugs.gnu.org id=B55139.165331249928216 (code B ref 55139); Mon, 23 May 2022 13:29:01 +0000 Received: (at 55139) by debbugs.gnu.org; 23 May 2022 13:28:19 +0000 Received: from localhost ([127.0.0.1]:47664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nt86d-0007L2-FA for submit@debbugs.gnu.org; Mon, 23 May 2022 09:28:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nt86c-0007Kp-EP for 55139@debbugs.gnu.org; Mon, 23 May 2022 09:28:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34032) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nt86X-0007NH-4G; Mon, 23 May 2022 09:28:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=U8HbzI8kuvsqKwJcNmYfj+SeD3Z3kcjDWQLAozcCwUI=; b=LnoLoj229VXPzMJWB7rv UsypbfFQgOiJF9TiBVbFzGom9vvcQScnCq2GeYUX3zOv0xsf9rrTIwJ5WeamFdYG9rJUY30UO2O66 2VqDUN651C1R414daiQMZMi9L+hPaMqvp/dnpVupk3dkNsMtCDPWzVINXokZlQjvY9YbR2RJZVB9L M+zSeYJhrNI61sz0xqpFRvkBqnugSnua38oUXiUomop+kaepy+TH8YiaIig1nGMDBa8a+qGzfwV8E +wHBHJq86RGWC3e09a4So8Nex99V86YtW1lWM6LifkqETdWFmepVKkqwW+5S2Xgsa6pv1KfIJXOKF xOQWVUrGoQVCog==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=40516 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nt86W-0004Fi-NY; Mon, 23 May 2022 09:28:12 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <8735hz2t4u.fsf@gmail.com> <87pmkvr6t2.fsf@gnu.org> <87v8ty5eq7.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 Prairial an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 23 May 2022 15:28:10 +0200 In-Reply-To: <87v8ty5eq7.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 22 May 2022 01:16:32 -0400") Message-ID: <87czg47505.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653312553; 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=U8HbzI8kuvsqKwJcNmYfj+SeD3Z3kcjDWQLAozcCwUI=; b=CHZS9ykGct28mH3IAka5A9mHjLpvOEVcnWdl991bKRQXp+8Z5moowW8asmG8PNXxiZwPJC Ti4TKU6IbN6NRw9v2S9j7ZZLNJURn3FWlYI5CYuF4uODBNXs0jAfBhDqGrHxhDLyuEimAc gfu0DpdSgG2Tv6DmnrNe0atZrY3OP1TgHbn8rF1D3A2UNBtgNyqzjYe5ABN/e4msJv9M1r rSwVKZhMD6HLjWu5CmzamtvYFpICIufVez6Vdd/PEoRXRjJwBaCLNX1syCO72fICYYRJ7J W9u9FpHcn4h9HiEz023G5WW6akr86ZEm2evTecMzJwnUwokwpHHAjj/v1QuWSg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653312553; a=rsa-sha256; cv=none; b=ndoMx+BSZEdZYQLZRvgV+yFfm2ssVSGOvojlRamfCkHHj3mKZdd+tA5iWASU5QEo27ueDI bwwSNWZ3QUQMhP4my5kH4JE3+XC9xyHkqs9FMfWi6459lHtMt0fP0x/nuivqVEVumsqfCP Rzd/qi2s3r+vdv1CliYllHeHkGhbjERKCPi/1uSmU65vHDlAvK0hxExZQ+v27CK8LHOl7p 5d8q4SbW5CLOqG8c3EVZ/npPf8qnoy7NFSdse+UjMb4Iup2zrS7mPMvEq43paOaZTDUFTC c/VwFfcuXPWyXk8maxTmco1g4IB4QGax3R/d5EECYCyWkhyM5Fwrl6j5cV5IvA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=LnoLoj22; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -3.95 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=LnoLoj22; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: 46F20EBCF X-Spam-Score: -3.95 X-Migadu-Scanner: scn1.migadu.com X-TUID: jRSEP9NSBxyv Hi! Maxim Cournoyer skribis: > Yeah, I ended up with this [0]: > > (define (locate-package-via-git name) > "Return the location object corresponding to package NAME, searched via= git." > (let* ((input-pipe (open-pipe* OPEN_READ > "git" "grep" "-n" "--column" > (format #f "^(define-public ~a$" name))) > (output (get-string-all input-pipe)) ;file:line:column:match > (exit-val (status:exit-val (close-pipe input-pipe)))) > (case exit-val > ((0) > (let ((components (string-split output #\:))) > (location > (first components) ;file > (string->number (second components)) ;1-indexed line > ;; FIXME: Comment discrepancy in (guix diagnostics), which > ;; says the column is 0-indexed. > (and=3D> (string->number (third components)) 1-)))) ;0-indexed = column > ((1) #f) ;no match > (else (error "git grep failed with status" exit-val))))) > > and it does feel silly to have to shell out to git, but it did the job. > > Thanks, > > Maxim > > [0] https://notabug.org/apteryx/guix-api-examples/src/master/purge-pytho= n2-packages.scm#L42 Nice, it=E2=80=99s good to have these examples=E2=80=94and hopefully we=E2= =80=99ll soon be able to remove a whole bunch of =E2=80=98python2-=E2=80=99 packages! As for =E2=80=98package-definition-location=E2=80=99, I don=E2=80=99t think= we can reasonably do any better, so I=E2=80=99m tempted to close the bug. WDYT? Ludo=E2=80=99.