import/cran: Fix detection of Fortran files.

This fixes a bug whereby the Guix importer considers files like .f.* to be
Fortran files.

The expression "\\.f(90|95)?" would match a lot of files containing ".f"
although they are not Fortran files.  Instead we should only consider files
with this *suffix*.

* guix/import/cran.scm (directory-needs-fortran?): Only check for suffixes.

Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
This commit is contained in:
Mădălin Ionel Patrașcu 2021-02-23 12:00:21 +01:00 committed by Ricardo Wurmus
parent 747f68bfb2
commit 35814292b6
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -361,7 +361,7 @@ (define (check pattern)
(define (directory-needs-fortran? dir)
"Check if the directory DIR contains Fortran source files."
(match (find-files dir "\\.f(90|95)?")
(match (find-files dir "\\.f(90|95)$")
(() #f)
(_ #t)))