From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#41242: Port feature/native-comp to Windows - Determine the emacs root dir... Date: Fri, 29 May 2020 14:26:37 +0000 Message-ID: References: <83k10wshvg.fsf@gnu.org> <83v9ken8xk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="29667"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: nicolasbertolo@gmail.com, 41242@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 29 16:27:17 2020 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 1jefye-0007Zz-0p for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 May 2020 16:27:16 +0200 Original-Received: from localhost ([::1]:39442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jefyc-0005y4-Sb for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 May 2020 10:27:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jefyS-0005wU-47 for bug-gnu-emacs@gnu.org; Fri, 29 May 2020 10:27:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44196) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jefyQ-0002cp-I2 for bug-gnu-emacs@gnu.org; Fri, 29 May 2020 10:27:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jefyQ-0000jo-EX for bug-gnu-emacs@gnu.org; Fri, 29 May 2020 10:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 May 2020 14:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41242 X-GNU-PR-Package: emacs Original-Received: via spool by 41242-submit@debbugs.gnu.org id=B41242.15907624022803 (code B ref 41242); Fri, 29 May 2020 14:27:02 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 29 May 2020 14:26:42 +0000 Original-Received: from localhost ([127.0.0.1]:55742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jefy5-0000j8-Om for submit@debbugs.gnu.org; Fri, 29 May 2020 10:26:41 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:52843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jefy4-0000iy-Mf for 41242@debbugs.gnu.org; Fri, 29 May 2020 10:26:41 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 04TEQbfu003293 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 29 May 2020 14:26:38 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 04TEQbIi007037; Fri, 29 May 2020 14:26:37 GMT In-Reply-To: <83v9ken8xk.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 29 May 2020 16:54:15 +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" Xref: news.gmane.io gmane.emacs.bugs:181188 Archived-At: Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: 41242@debbugs.gnu.org, Eli Zaretskii >> Date: Fri, 29 May 2020 12:12:49 +0000 >> >> question: what if instead of using Ffile_exists we just use fopen to >> check if the file exists in dump_do_dump_relocation? >> >> I think the origin of "the trouble" is just there while checking if a >> file exists, the path in discussion should be already absolute by >> construction so I suspect we do not need Fexpand_file to come into play. > > Will that work if the files were moved? I think so yes, the absolute path under discussion is generated on purpose using Vinvocation_directory as follow: pdumper.c:5304 ===== if (installation_state == UNKNOWN) /* Check just once if is a local build or Emacs got installed. */ installation_state = NILP (Ffile_exists_p (concat2 (Vinvocation_directory, XCAR (comp_u->file)))) ? LOCAL_BUILD : INSTALLED; ==== Andrea -- akrl@sdf.org