From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6FeYDgQVoWL7GQAAbAwnHQ (envelope-from ) for ; Wed, 08 Jun 2022 23:30:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KFOeDgQVoWLVeQEA9RJhRA (envelope-from ) for ; Wed, 08 Jun 2022 23:30:44 +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 02C821D563 for ; Wed, 8 Jun 2022 23:30:44 +0200 (CEST) Received: from localhost ([::1]:58072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nz3GE-0006xa-O3 for larch@yhetil.org; Wed, 08 Jun 2022 17:30:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nz3Fb-0006wR-72 for bug-guix@gnu.org; Wed, 08 Jun 2022 17:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nz3Fa-0007vd-Ti for bug-guix@gnu.org; Wed, 08 Jun 2022 17:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nz3Fa-0001yC-QN for bug-guix@gnu.org; Wed, 08 Jun 2022 17:30:02 -0400 Subject: bug#55139: package-location is wrong for transformed packages Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Wed, 08 Jun 2022 21:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 55139 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 55139-done@debbugs.gnu.org Mail-Followup-To: 55139@debbugs.gnu.org, maxim.cournoyer@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 55139-done@debbugs.gnu.org id=D55139.16547237577478 (code D ref 55139); Wed, 08 Jun 2022 21:30:02 +0000 Received: (at 55139-done) by debbugs.gnu.org; 8 Jun 2022 21:29:17 +0000 Received: from localhost ([127.0.0.1]:44447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nz3Er-0001wX-Ke for submit@debbugs.gnu.org; Wed, 08 Jun 2022 17:29:17 -0400 Received: from mail-qt1-f174.google.com ([209.85.160.174]:44814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nz3Eq-0001wJ-G5 for 55139-done@debbugs.gnu.org; Wed, 08 Jun 2022 17:29:17 -0400 Received: by mail-qt1-f174.google.com with SMTP id t21so8862254qtw.11 for <55139-done@debbugs.gnu.org>; Wed, 08 Jun 2022 14:29:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=Ax/kF/qZFB5H1TFLrbX6LNfevskd0akVn4SpfdEwskE=; b=eAwrnOiK4nPCgBQzmXYc+mrRhlABsTczl6KilzMGLxikUragOuNRkoyaro2akO19x8 VohlQ/6t1sw9tR/tTOe6FpFE8sO4r9sas/EnV/PDHJHQvuL3myJ/qL6HdqVdaqYg85wl kxi0paYrwFyWsOoadkVvEfRmskTapBEll6442SRvbT3cFuHKBz9Pov3emLVzG0RnwiKC /9KEtv/R4V7DUaZcz+wIGcephx2Fl/PUQNow6f5TGa3O/+UKOkvDHX0kISUaKnlL9AFJ n813YEGVtLnV+kmgxzOtENRsBOGvUHkRL/YGBqEnWOA/BgoSx/j9eDYCRJlOUQhf6U65 Lrkg== 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:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Ax/kF/qZFB5H1TFLrbX6LNfevskd0akVn4SpfdEwskE=; b=XG9vuGe77ZiyBRjNvU5Odm7ZmLOl1LFjj/MlNSJyVRpvI/GlgEa2txyW+O4xiusaD7 f3tFPb8FPnTAtFs4NuO04H7aJhbyq5PcBx44z6HkNgEC4Rv7sK02/aGOQAY/FQSc5b4g k1uBlZ11+cwwi5IAUk/JYHaWgzJZBN/W5Wq7AfsAcTQf15JtB1KkjSOuBNomEe8r/9rb jq45/y0IHFMlqBbRPcWXDv4+Oc8TLln8ylaEtoqXYQVHddohzjHU6zee/vp+I0lWmaVc 2bA2MxegAfEcaFHXlJz8ZXsq9xWsy5cLRsQTlG+HK1tt8KDOvyrHXKvy0x8m8BQJas4x addA== X-Gm-Message-State: AOAM533+4/UHoX39gcC8UTLRH2d8EDblW9VP7XymVwTMsIDAkfKdp3CD 2ld23PXMNvyzZKTr/2roWL/CPteqoIwNg/ar X-Google-Smtp-Source: ABdhPJwcwaYgllj66SJXh/y0B6o+us224KWNjKU7FHdrlzonF/1hhpel8zLbWQaOEWwFuNSWFcwN+Q== X-Received: by 2002:a05:622a:310:b0:2f3:da5f:337a with SMTP id q16-20020a05622a031000b002f3da5f337amr30030565qtw.562.1654723750264; Wed, 08 Jun 2022 14:29:10 -0700 (PDT) Received: from hurd (dsl-151-172.b2b2c.ca. [66.158.151.172]) by smtp.gmail.com with ESMTPSA id z19-20020ac87f93000000b002f936bae288sm16400191qtj.87.2022.06.08.14.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 14:29:09 -0700 (PDT) From: Maxim Cournoyer References: <8735hz2t4u.fsf@gmail.com> <87pmkvr6t2.fsf@gnu.org> <87v8ty5eq7.fsf@gmail.com> <87czg47505.fsf@gnu.org> Date: Wed, 08 Jun 2022 17:29:08 -0400 In-Reply-To: <87czg47505.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 23 May 2022 15:28:10 +0200") Message-ID: <87tu8uj13v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (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=1654723844; 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-to: 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=Ax/kF/qZFB5H1TFLrbX6LNfevskd0akVn4SpfdEwskE=; b=KWkeEUWyZbG+uoU1r42nNaodqX+MS+Vm9AYp3YodsgNus91p0WZCT5uV/aoLfNt9+VlI1O NyWridjG0pympfxjRHdfl6tmgHV08T/WatcXwUQXQGo6ON8rdGl7KvwouBu+1jzQkbF4Jd e6jOEEwH29pM5BgC7FE2MPIw1nYvDkKUrJ1PJ6zKvgIBUkrFxVbLcHw4kbhiJcih5dPkMx Nsx+QyJjvFs2JObh+E9Q1nZvOnU9KKuaoduvrc0hOIOA1/N8JraygZPdOrhAXOVQK1Fx0c ciKPdZxgTjajvYxqiftSt0LioNDQ4hL/8kmlsbvdw05JGacHqBZw5Svqg7GoEg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654723844; a=rsa-sha256; cv=none; b=Bj7TQXIYS3cfRJHgDxq48ex5yPREk2FlcNqhp/Cca2l6UUyNSQhXP+Q1GNYMiDHUIW9kt1 gxH8f9Zwngxoh1uyidPmo3g4dx0GopiJvrIKsbW9/+0D5+CNUAH6cEk89Whca60zQqHsN9 NsZzDTkbT8jYuT2ZyYmZPyzvMxxesD4txCOsRXh3wMrZ2e6fzX6R8IkIwYZOliT5HHRfUS Ma6PKrGJuF6Pn/fGRpSHmdNuYh5E+dTbFL4RtcGpp2CKBheX8iGmIKoA75PmL7+LKO1U9r TPpTC7ohrT4/xwwAeMq0BNmmISNnChXr/e692zQnv8jwmh429w6kg3eKNZDHig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=eAwrnOiK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 4.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=eAwrnOiK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Queue-Id: 02C821D563 X-Spam-Score: 4.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9zUbE8Frm8+C Hi Ludovic, Ludovic Court=C3=A8s writes: > 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 vi= a 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-pyth= on2-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 thi= nk we can reasonably do > any better, so I=E2=80=99m tempted to close the bug. OK; thanks for your input. At least it'll be recorded somewhere for the next person stumbling on this behavior to discover. Maxim