From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: bug#24737: `guix lint` should not check patch-file-names on inherited sources Date: Sat, 22 Oct 2016 20:07:15 +0100 Message-ID: <87funo5hjw.fsf@duckhunt.i-did-not-set--mail-host-address--so-tickle-me> 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> 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]:49493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1by1eH-00073H-Fn for bug-guix@gnu.org; Sat, 22 Oct 2016 15:08:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1by1eE-00006U-B6 for bug-guix@gnu.org; Sat, 22 Oct 2016 15:08:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59424) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1by1eE-00006Q-7L for bug-guix@gnu.org; Sat, 22 Oct 2016 15:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1by1eE-0005gq-2X for bug-guix@gnu.org; Sat, 22 Oct 2016 15:08:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87insk5i7l.fsf@duckhunt.i-did-not-set--mail-host-address--so-tickle-me> 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 24737@debbugs.gnu.org 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 fr= om >> 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.