From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 11 13:32:23 2022 Received: (at 57790) by debbugs.gnu.org; 11 Oct 2022 17:32:23 +0000 Received: from localhost ([127.0.0.1]:54741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiJ79-0003QD-5F for submit@debbugs.gnu.org; Tue, 11 Oct 2022 13:32:23 -0400 Received: from mout02.posteo.de ([185.67.36.66]:60833) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiJ75-0003Pz-5F for 57790@debbugs.gnu.org; Tue, 11 Oct 2022 13:32:21 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1C7DF240104 for <57790@debbugs.gnu.org>; Tue, 11 Oct 2022 19:32:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665509533; bh=5vjXzQD0037QGfp1HzGpOpYgo7cSTmTvNjSC8dWcJQQ=; h=From:To:Subject:Date:From; b=dqwatssKvemXbMyxvzLBc3vNklciDbQ5ZOPwNUg5Vt4wNpv7aTjTTG0K7Gm22IGSu aQE9c0ZrIJek/eFk5LQB443RJA1MzHQ1svJKhIl5scBZ15i82Cv5vrdorRzEzQMQ0E /XBXziF8RWvTgQVlB6F2myBMgbG4iyLx8ZOCrXNJufwsQOkj/ILJCjdgE8t+XCi7fn OLcP3XFp7Fmr/JNyDo+0X6p54lNCv70XgJoKjcjBrydsCq5zj4DJnw5J0w6VZJzLsV sMxODBl+kZRnFIODsLrnFidVvYvLrVbbWOQMfOWC53oZEiWOO25gjyqTeEogpYgMPI RjcZNoydW5lGQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mn2sP4cjjz6tq0; Tue, 11 Oct 2022 19:32:09 +0200 (CEST) From: Fredrik Salomonsson To: zimoun , 57790@debbugs.gnu.org Subject: Re: bug#57790: Strange behavior with emacs-build-system In-Reply-To: <86wn96ofhp.fsf@gmail.com> References: <87v8pqbr0o.fsf@d2.com> <86wn96ofhp.fsf@gmail.com> Date: Tue, 11 Oct 2022 17:32:07 +0000 Message-ID: <87k056qnag.fsf@d2.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57790 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, zimoun writes: > On Wed, 14 Sep 2022 at 02:59, Fredrik Salomonsson w= rote: > >> If I name the local clone `issue.el` (name of the directory); >> `guix=C2=A0build=C2=A0-f=C2=A0guix.scm` will fail. It will just copy the= file >> `issue.el` and then `ert-runner` fails as there is no test directory. >> >> But if I name the local clone something else, e.g. `issue-el` then it >> will copy all the files, `ert-runner` will be happy and >> `guix=C2=A0build=C2=A0-f=C2=A0guix.scm` will succeed. >> >> I'm not sure if this is an issue in `emacs-build-system`, `local-file` >> or plain old user error. > > Well, I guess it comes from =E2=80=99unpack=E2=80=99; which reads: > > --8<---------------cut here---------------start------------->8--- > (define* (unpack #:key source #:allow-other-keys) > "Unpack SOURCE into the build directory. SOURCE may be a compressed > archive, a directory, or an Emacs Lisp file." > (if (string-suffix? ".el" source) > (begin > (mkdir "source") > (chdir "source") > (copy-file source (store-file->elisp-source-file source)) > #t) > (gnu:unpack #:source source))) > --8<---------------cut here---------------end--------------->8--- Ah, yeah that would make sense. > Well, I guess again that the =E2=80=99source=E2=80=99 should contain some= thing like, > > (file-name (git-file-name name version) > > to avoid the issue. But the naive approach does not work with > =E2=80=99local-file=E2=80=99. Would `file-is-directory?` work? E.g. (if (and (string-suffix? ".el" source) (not (file-is-directory? source))) =E2=80=A6) I'm currently at work so I cannot test this right now. --=20 s/Fred[re]+i[ck]+/Fredrik/g