File: 0003-Fix-autopkgtest-regression.patch

package info (click to toggle)
spglib 2.6.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,092 kB
  • sloc: ansic: 126,258; python: 7,537; f90: 2,163; cpp: 1,261; ruby: 792; makefile: 30; sh: 18
file content (36 lines) | stat: -rw-r--r-- 1,547 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Lucas Kanashiro <kanashiro@debian.org>
Date: Mon, 27 Jan 2025 07:54:18 -0300
Subject: Fix autopkgtest regression

We are getting the following failure:

321s autopkgtest [08:19:10]: test command1: RUBYLIB=ruby ruby ruby/symPoscar.rb test/functional/python/data/hexagonal/POSCAR-168 | fgrep --silent 'P6 (168) / 6 / P 6 (462) /'
321s autopkgtest [08:19:10]: test command1: [-----------------------
321s /tmp/autopkgtest.DJT60Q/build.c82/src/ruby/poscar.rb:286:in `parse': undefined method `=~' for false:FalseClass (NoMethodError)
321s 	from /tmp/autopkgtest.DJT60Q/build.c82/src/ruby/poscar.rb:212:in `initialize'
321s 	from ruby/symPoscar.rb:257:in `new'
321s 	from ruby/symPoscar.rb:257:in `<main>'
322s autopkgtest [08:19:11]: test command1: -----------------------]
322s autopkgtest [08:19:11]: test command1:  - - - - - - - - - - results - - - - - - - - - -
322s command1             FAIL non-zero exit status 1

Applying this patch fixes the issue.

Forwarded: no
---
 ruby/poscar.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ruby/poscar.rb b/ruby/poscar.rb
index 45c4168..e8172ef 100644
--- a/ruby/poscar.rb
+++ b/ruby/poscar.rb
@@ -283,7 +283,7 @@ module Vasp
         @selectiveDynamics = true
         temp = @input.readline           # when this situation, reading one more line is nessesarry
       end
-      if (! temp =~ /^\s*d/i)
+      if ! (temp =~ /^\s*d/i)
         # allow only 'Direct' now
         warn "#{filename}: line 7 or 8"
         warn "poscar.rb can handle only direct coordinates."