From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#24737: `guix lint` should not check patch-file-names on inherited sources Date: Mon, 24 Oct 2016 22:03:52 +0200 Message-ID: <871sz5345z.fsf@gnu.org> References: <87zim05tvp.fsf@duckhunt.i-did-not-set--mail-host-address--so-tickle-me> <87eg3c5d8b.fsf@gnu.org> <87insk5i7l.fsf@duckhunt.i-did-not-set--mail-host-address--so-tickle-me> <87funo5hjw.fsf@duckhunt.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bylUY-0000hX-Mo for bug-guix@gnu.org; Mon, 24 Oct 2016 16:05:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bylUU-0007Yr-LT for bug-guix@gnu.org; Mon, 24 Oct 2016 16:05:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:39517) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bylUU-0007Yj-Ir for bug-guix@gnu.org; Mon, 24 Oct 2016 16:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bylUU-000866-BJ for bug-guix@gnu.org; Mon, 24 Oct 2016 16:05:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87funo5hjw.fsf@duckhunt.i-did-not-set--mail-host-address--so-tickle-me> (Marius Bakke's message of "Sat, 22 Oct 2016 20:07:15 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Marius Bakke Cc: 24737@debbugs.gnu.org Marius Bakke skribis: > Marius Bakke writes: > >> Ludovic Court=C3=A8s writes: >> >>> Marius Bakke skribis: >>> >>>> After patching 'notmuch', `guix lint -c patch-file-names` does not pass >>>> for 'python-notmuch' which inherits the source from 'notmuch'. >>> >>> I agree but that=E2=80=99s not quite possible: the =E2=80=9Cinheritance= =E2=80=9D relation (which >>> is really just a copy of a record) is not known at run time. >>> >>> So we=E2=80=99d need another trick to guess whether a patch is coming f= rom >>> elsewhere and should consequently be ignored by =E2=80=98lint=E2=80=99. >> >> Here is a "RFC" patch that thwarts the warning if the source file name >> is different from the package name. Not sure how to properly make it >> part of the procedure, so that the checks are actually skipped as well. > > I just realized this approach will skip this check completely, if there > are no packages that are named the same as origin (e.g. in the case of > the soon-to-be-added avro, where the source is shared between the > various avro-{c,python,java} etc packages.) > > The best approach is probably to check patch-file-names against > (origin-actual-file-name (package-source package)), assuming one can > extract the "base" name of origin-actual-file-name reliably. (=E2=80=98origin-actual-file-name=E2=80=99 already returns a basename.) Could you check whether the patch your proposed works well for some of the annoying cases we currently have, and also adds those as test cases in =E2=80=98tests/lint.scm=E2=80=99? (See the manual on how to run the tes= ts (info "(guix) Running the Test Suite").) If that works well enough, we should go for it. The only 100% reliable way to address this, I think, would be to build a patch to package mapping, and then make sure that for each patch, at least one of the corresponding packages has a matching name. The problem is that =E2=80=98lint=E2=80=99 is currently designed to work one pa= ckage at a time. Thanks! Ludo=E2=80=99.