Package: src:nanoc
Version: 4.11.23-1
Severity: serious
Tags: ftbfs, patch
Dear maintainer:
During a rebuild of all packages in bullseye I noticed that this package
does not build from source anymore:
1) Nanoc::Core has up-to-date version information
Failure/Error: expect(described_class.version_information).to
match(/–#{current_year} /)
expected "Nanoc 4.11.23 © 2007–2021 Denis Defreyne.\nRunning
ruby 2.7.4 (2021-07-07) on x86_64-linux-gnu with RubyGems 3.2.5.\n" to
match /–2022 /
Diff:
@@ -1,2 +1,3 @@
-/–2022 /
+Nanoc 4.11.23 © 2007–2021 Denis Defreyne.
+Running ruby 2.7.4 (2021-07-07) on x86_64-linux-gnu with
RubyGems 3.2.5.
This happens because there is a test which expects the current year to
be equal to 2021, which naturally fails now that we are in 2022, and
will fail forever from now on.
I include a trivial patch to disable the test in bullseye.
Note also that the current version in testing/unstable also has the bug
in "latent state", as it will fail from 2023 onwards. To check this, try
building the package after setting current_year to 2023 as in
poc.diff.txt and you will see what happens next year.
Thanks.
[ p.s. I'm having a dejavu. Didn't I report something like this a few
years ago? ]--- a/nanoc-core/spec/nanoc/core_spec.rb
+++ b/nanoc-core/spec/nanoc/core_spec.rb
@@ -3,8 +3,8 @@
require 'nanoc/version'
describe Nanoc::Core do
- it 'has up-to-date version information' do
- current_year = Date.today.year
- expect(described_class.version_information).to match(/–#{current_year} /)
- end
+# it 'has up-to-date version information' do
+# current_year = Date.today.year
+# expect(described_class.version_information).to match(/–#{current_year} /)
+# end
end
--- a/nanoc-core/spec/nanoc/core_spec.rb
+++ b/nanoc-core/spec/nanoc/core_spec.rb
@@ -4,7 +4,7 @@ require 'nanoc/version'
describe Nanoc::Core do
it 'has up-to-date version information' do
- current_year = Date.today.year
+ current_year = 2023
expect(described_class.version_information).to match(/–#{current_year} /)
end
end