guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packaging Jami progress


From: Ricardo Wurmus
Subject: Re: Packaging Jami progress
Date: Sun, 22 Dec 2019 08:48:31 +0100
User-agent: mu4e 1.2.0; emacs 26.3

Jan Wielkiewicz <address@hidden> writes:

> The fragment of code I wrote looks like this:
>
> (add-before 'check 'skip-test
>   (lambda _
>     (substitute* "tests/Makefile"
>       (("include $(SRC_PATH)/tests/fate/lavf-container.mak")
>                       "")) #t))
>
> I also made the git checkout writeable.
> Am I doing something wrong? Should I try deleting the test using
> snippet or just skip all tests using #:tests? #f?

The problem here is that “substitute*” expects regular expressions and
“$”, “(”, “)”, and “.” all have special meaning in a regular expression
context, so they need to be escaped.  Escaping is done with a backslash,
but using a backslash in a string in Guile requires another layer of
escaping, so we end up with this expression:

    (add-before 'check 'skip-test
      (lambda _
        (substitute* "tests/Makefile"
          (("include \\$\\(SRC_PATH\\)/tests/fate/lavf-container.mak") ""))
        #t))

(I did not escap the dot here because it can only match a single
character, a literal dot in this case.)

--
Ricardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]