From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64242: [PATCH] Fix VC package build when there is no docs dir Date: Fri, 23 Jun 2023 10:10:06 +0300 Message-ID: <83zg4q1woh.fsf@gnu.org> References: <877cruvijk.fsf@dsemy.com> <83352i3ed4.fsf@gnu.org> <87fs6ilme6.fsf@dsemy.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18707"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64242@debbugs.gnu.org To: Daniel Semyonov , Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 23 09:11:22 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qCawz-0004ic-WC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Jun 2023 09:11:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCawl-0003bS-Rb; Fri, 23 Jun 2023 03:11:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCawg-0003ag-Ue for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2023 03:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qCawg-00005A-Cz for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2023 03:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCawg-0001sI-8c for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2023 03:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jun 2023 07:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64242 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64242-submit@debbugs.gnu.org id=B64242.16875042047120 (code B ref 64242); Fri, 23 Jun 2023 07:11:02 +0000 Original-Received: (at 64242) by debbugs.gnu.org; 23 Jun 2023 07:10:04 +0000 Original-Received: from localhost ([127.0.0.1]:37367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCavj-0001ql-DD for submit@debbugs.gnu.org; Fri, 23 Jun 2023 03:10:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCavh-0001q6-Bn for 64242@debbugs.gnu.org; Fri, 23 Jun 2023 03:10:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCavb-0007zI-MA; Fri, 23 Jun 2023 03:09:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QB8C0k7QkhpvpVGC4OOWM6FY2pcJpEOV2eHvXN25vxk=; b=F4zKien8WtNx v0h2+onJMXK8PhwbDffh/I1L6Y7t1U0DlLWcYz6X6PT3j+EFCfK6TSGPUuNW4tq1yl7fxzJef9EWj KkWATvWPaVFMjsOxxwb120WAJybBi7CoWlVWtae+JvgfqCTGwO+2u8IxW2IUreRJnE2qCeNFpj7cM IwHYxl/0oEZfCtMDPjPpzf+oGzDJ2cCuyvSDfs5qFXB2P4Ev4h2ckKHjQ5Pf3yB/5zsweBKNVI08I tOxfslQLedQoWOZVbPYOXltnU6okpSoGkv08ZvYOQWkXvHBqAqhE7nfEf2ClY2V1EECDkLL4M6cNM QlDV8CWFhh9HclKEXNtkbg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCavZ-0000Aa-VZ; Fri, 23 Jun 2023 03:09:55 -0400 In-Reply-To: <87fs6ilme6.fsf@dsemy.com> (message from Daniel Semyonov on Fri, 23 Jun 2023 09:32:01 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263934 Archived-At: > From: Daniel Semyonov > Cc: 64242@debbugs.gnu.org > Date: Fri, 23 Jun 2023 09:32:01 +0300 > > >>>>> Eli Zaretskii writes: > > > What do you mean by "isn't a directory"? FILE is supposed to be a > > documentation file, not a directory, see the doc string of this > > function. Do you mean that FILE is a relative file name so that > > file-name-directory returns nil for it? If so, I think the > > correct fix would be to reverse the order: > > > (docs-directory (file-name-directory (expand-file-name file))) > > Yeah, you're completely right, this was a misunderstanding on my part; > my fix just happened to also work so I made some incorrect assumptions. > > After some further testing, this seems to happen for packages for which > the doc file is in the base directory of the package (which causes > 'file-name-directory' to return nil as the doc file name is relative to > the package dir). > > I attached an updated patch. > > > Can you show a recipe to reproduce this problem, preferably > > starting from "emacs -Q"? > > 1. $ emacs -Q > 2. M-x package-vc-install RET eat RET > 3. A few seconds later, > "package-vc--unpack-1: Wrong type argument: stringp, nil" > > > And finally, this issue exists on the emacs-29 release branch as > > well, doesn't it? > > I haven't tested it, but I don't see a reason it wont. Philip, any comments or objections to installing this on the emacs-29 branch? Thanks.