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 IFSkI+RFcGIBvAAAbAwnHQ (envelope-from ) for ; Mon, 02 May 2022 22:58:12 +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 kMWVI+RFcGJ92AAA9RJhRA (envelope-from ) for ; Mon, 02 May 2022 22:58:12 +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 E0D2B133D7 for ; Mon, 2 May 2022 22:58:11 +0200 (CEST) Received: from localhost ([::1]:57340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nld7S-0008Td-C4 for larch@yhetil.org; Mon, 02 May 2022 16:58:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nld7J-0008TH-Sg for bug-guix@gnu.org; Mon, 02 May 2022 16:58:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nld7J-0005S2-KZ for bug-guix@gnu.org; Mon, 02 May 2022 16:58:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nld7J-0003j8-It for bug-guix@gnu.org; Mon, 02 May 2022 16:58: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, 02 May 2022 20:58: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.165152507514315 (code B ref 55139); Mon, 02 May 2022 20:58:01 +0000 Received: (at 55139) by debbugs.gnu.org; 2 May 2022 20:57:55 +0000 Received: from localhost ([127.0.0.1]:38111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nld7C-0003ip-Nl for submit@debbugs.gnu.org; Mon, 02 May 2022 16:57:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nld7B-0003ia-FX for 55139@debbugs.gnu.org; Mon, 02 May 2022 16:57:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nld76-0005QN-49; Mon, 02 May 2022 16:57:48 -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=8u5Yeiy0kbK57DtNg/VbIyDnZeVoui2s2mHjc8TN9WA=; b=l8BghTcdY//D00QWCoVe B576IGpLD/qUnSzYelOJmUyXJnejIr6NpCDG98vSDUBS1D16Cm86nV+3Ql02Eb7oBwGeTxM00YtqC HbYNLhr0GCXL/mruoGp49SIbLovgtV+ZV2j2yT2ykYp6Sjc0KNVwC6fXAoApZDxhd74OC63xOxnjg 9UO4KfJacYUUOH1jiFK5ClfiYXx4ehJgJxcFIRSweFBaJUVXTrrlM8Ws9UqZU2V4NV8Nb/auFK0vi H7d0NmWLFt+b3G8B475q44cshP2EFRMHjeh8SrJYR3nQOUVnA/wd52AD76DS27HLxUcfysbDEMOcu bkg20j4CSSx1Wg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:57254 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nld75-0007uI-Mr; Mon, 02 May 2022 16:57:47 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <8735hz2t4u.fsf@gmail.com> Date: Mon, 02 May 2022 22:57:45 +0200 In-Reply-To: <8735hz2t4u.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 26 Apr 2022 21:48:49 -0400") Message-ID: <87pmkvr6t2.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=1651525092; 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=8u5Yeiy0kbK57DtNg/VbIyDnZeVoui2s2mHjc8TN9WA=; b=d06lvXpDy9lS5/y6jEKRTtMjrpZcSzFKx+Oogvbvi0hI2a7I0Hj3xI6PL2YNZpSug3CZ3o 4iX0ZHPa1U3xp7zoAAkOJTZtEi51j8u7nptpngKA/kCHncoRY95cV0r61DdU5WYiJJME5M jDLIyG9z/8ay467Y/m893+xJfj0Lw4L+tj2a3IJkxj8tWObboLlmdCblvjjvMUQOk/wMtD rlhg7cYhbcPtykTb8uEtSGhvIRbveJ8bVH0UV6JSJJreJmewJPUkuRkUIe+7HehfLhl6NC rES421T0qlKco2Htb5yUi9jxzUUUZcRv7gg0kdTsia5KXQHamx6ZziCZVR0Ryw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651525092; a=rsa-sha256; cv=none; b=FEcBdIiBf+g6/TG08gnQL5O6OlzA9hgMHri5YD/RDcw/qTxcnWl2TLXZ4JTMVdAJ5pp+vM 28de1UPYg/PH4hPn4TVgbIrXHKgzBrWRi6+Iez/U5jLht20rn3T/90oWOZgoDq2JhPEag4 DheslTeQh32RnGSvKweac78XO6EO8rQ7x1Gi6ugdHtZAN52JMBQ2eWf59PCBpo5OCEMDOb DPGnvonhEOt7Omh1Yf8fUHWdxtZSXvgQnutC45hxQlQi3f/tLTLFTnznZlYGLEmNk2amXQ 9j8GzcCuL8pj070Vpek9kA4hA6j4r8DGx6iTdTSksKNH1gYhg0VjME3x6mZuCA== 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=l8BghTcd; 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: -2.38 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=l8BghTcd; 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: E0D2B133D7 X-Spam-Score: -2.38 X-Migadu-Scanner: scn1.migadu.com X-TUID: bNw28OtYAwKp Hi, Maxim Cournoyer skribis: >> ,import (gnu packages) (guix packages) >> (car (find-packages-by-name "python2-pyalsaaudio")) > $1 =3D # >> (package-definition-location-code package $1) > $2 =3D #f >> (package-definition-location $2) > $3 =3D #< file: "gnu/packages/audio.scm" line: 4327 column: 2> > > > This is wrong though, and gives the location of the parent package (the > one it inherited from). This seems to be made on purpose (?) given the > code in (gnu build-system python): > > (package/inherit p > (location (package-location p)) > > ^ Here, we explicitly set the location to that of its parent. Indeed, that=E2=80=99s on purpose; the rationale is that it=E2=80=99s more = useful to see the location of the original package (the Python=C2=A03 variant) than always this one line in gnu/build-system/python.scm. > Another related issue for package-with-python2 packages: > >> (package-definition-location-code $1) > $4 =3D #f Yes, I see it=E2=80=99s annoying, but that=E2=80=99s expected. > I was expecting to use this to get rid of all leaf Python 2 packages, > but it seems that may not work (as easily as I'd hoped). You were willing to have a script that would automatically delete the relevant lines, right? It=E2=80=99s kinda silly but I think the script will have to estimate the definition location by looking for =E2=80=9C(define-public python2-=E2=80= =A6=E2=80=9D. HTH, Ludo=E2=80=99.