[PATCH] guix import: Fixing detection of Fortran files.

  • Done
  • quality assurance status badge
Details
2 participants
  • Mădălin Ionel Patrașcu
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Mădălin Ionel Patrașcu
Severity
normal

Debbugs page

Mădălin Ionel Patrașcu wrote 4 years ago
(address . guix-patches@gnu.org)(address . rekado@elephly.net)(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)
20210223110021.10765-1-madalinionel.patrascu@mdc-berlin.de
This fixes a bug whereby Guix importer considers files like .f.*
being Fortran's files.

(find-files dir "\\.f(90|95)?")

would consider a lot of files with an extension starting with f
being a Fortran file. The right way is to consider only files
ending with .f90 or .f95.

*guix/import/cran.scm: changing pattern of the detection for
Fortran's files to .f(90|95)$.

Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
---
guix/import/cran.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index e8caf080fd..dbc858cb84 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -361,7 +361,7 @@ empty list when the FIELD cannot be found."
(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)))
--
2.30.1
Ricardo Wurmus wrote 4 years ago
(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)(address . 46715-done@debbugs.gnu.org)
8735xebl6l.fsf@elephly.net
Hi Mădălin,

Thanks! I applied this with a few changes in the commit message.
(Commit 35814292b6.)

--
Ricardo
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 46715@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 46715
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help