From: Fredrik Salomonsson <plattfot@posteo.net>
To: zimoun <zimon.toutoune@gmail.com>, 57790@debbugs.gnu.org
Subject: bug#57790: Strange behavior with emacs-build-system
Date: Tue, 11 Oct 2022 17:32:07 +0000 [thread overview]
Message-ID: <87k056qnag.fsf@d2.com> (raw)
In-Reply-To: <86wn96ofhp.fsf@gmail.com>
Hi,
zimoun <zimon.toutoune@gmail.com> writes:
> On Wed, 14 Sep 2022 at 02:59, Fredrik Salomonsson <plattfot@posteo.net> wrote:
>
>> If I name the local clone `issue.el` (name of the directory);
>> `guix build -f guix.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 build -f guix.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 ’unpack’; 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 ’source’ should contain something like,
>
> (file-name (git-file-name name version)
>
> to avoid the issue. But the naive approach does not work with
> ’local-file’.
Would `file-is-directory?` work? E.g.
(if (and (string-suffix? ".el" source)
(not (file-is-directory? source)))
…)
I'm currently at work so I cannot test this right now.
--
s/Fred[re]+i[ck]+/Fredrik/g
next prev parent reply other threads:[~2022-10-11 17:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 2:59 bug#57790: Strange behavior with emacs-build-system Fredrik Salomonsson
2022-10-11 9:51 ` zimoun
2022-10-11 17:32 ` Fredrik Salomonsson [this message]
2022-10-12 3:46 ` Fredrik Salomonsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k056qnag.fsf@d2.com \
--to=plattfot@posteo.net \
--cc=57790@debbugs.gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).