Package: auto-multiple-choice
Version: 1.3.0-3
Severity: grave
Tags: patch
Justification: renders package unusable
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu artful ubuntu-patch

Hi Alexis, Georges,

The auto-multiple-choice package is broken in unstable now that perl 5.26
has landed, because it uses obsolete syntax.  'use encoding "utf8"' is
obsolete, replaced by 'use utf8'.

This shows up in the form of failing autopkgtests:

https://ci.debian.net/packages/a/auto-multiple-choice/unstable/amd64/

The attached patch corrects this problem, and I have uploaded it to Ubuntu's
devel series.

Hope that helps,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru auto-multiple-choice-1.3.0/debian/patches/perl-5.26-compat.patch 
auto-multiple-choice-1.3.0/debian/patches/perl-5.26-compat.patch
--- auto-multiple-choice-1.3.0/debian/patches/perl-5.26-compat.patch    
1969-12-31 16:00:00.000000000 -0800
+++ auto-multiple-choice-1.3.0/debian/patches/perl-5.26-compat.patch    
2017-07-29 23:56:30.000000000 -0700
@@ -0,0 +1,58 @@
+Description: fix compatibility with perl 5.26
+ 'use encoding "utf8"' is obsolete in perl 5.26, returning an error:
+ Error:  The encoding pragma is no longer supported at [...]
+ replace with 'use utf8'.
+Author: Steve Langasek <steve.langa...@ubuntu.com>
+
+Index: auto-multiple-choice-1.3.0/AMC-prepare.pl
+===================================================================
+--- auto-multiple-choice-1.3.0.orig/AMC-prepare.pl
++++ auto-multiple-choice-1.3.0/AMC-prepare.pl
+@@ -18,7 +18,7 @@
+ # along with Auto-Multiple-Choice.  If not, see
+ # <http://www.gnu.org/licenses/>.
+ 
+-use encoding "utf-8";
++use utf8;
+ 
+ use File::Copy;
+ use File::Spec::Functions qw/splitpath catpath splitdir catdir catfile 
rel2abs tmpdir/;
+Index: auto-multiple-choice-1.3.0/AMC-note.pl
+===================================================================
+--- auto-multiple-choice-1.3.0.orig/AMC-note.pl
++++ auto-multiple-choice-1.3.0/AMC-note.pl
+@@ -25,7 +25,7 @@
+ use AMC::Scoring;
+ use AMC::Data;
+ 
+-use encoding 'utf8';
++use utf8;
+ 
+ my $darkness_threshold=0.1;
+ my $darkness_threshold_up=1.0;
+Index: auto-multiple-choice-1.3.0/AMC-annote.pl
+===================================================================
+--- auto-multiple-choice-1.3.0.orig/AMC-annote.pl
++++ auto-multiple-choice-1.3.0/AMC-annote.pl
+@@ -35,7 +35,7 @@
+ use AMC::DataModule::layout qw/:flags/;
+ use AMC::Substitute;
+ 
+-use encoding 'utf8';
++use utf8;
+ 
+ my $cr_dir="";
+ my $rep_projet='';
+Index: auto-multiple-choice-1.3.0/AMC-perl/AMC/Annotate.pm
+===================================================================
+--- auto-multiple-choice-1.3.0.orig/AMC-perl/AMC/Annotate.pm
++++ auto-multiple-choice-1.3.0/AMC-perl/AMC/Annotate.pm
+@@ -36,7 +36,7 @@
+ use AMC::DataModule::layout qw/:flags/;
+ use AMC::Gui::Avancement;
+ 
+-use encoding 'utf8';
++use utf8;
+ 
+ sub new {
+     my (%o)=(@_);
diff -Nru auto-multiple-choice-1.3.0/debian/patches/series 
auto-multiple-choice-1.3.0/debian/patches/series
--- auto-multiple-choice-1.3.0/debian/patches/series    2017-06-20 
14:18:05.000000000 -0700
+++ auto-multiple-choice-1.3.0/debian/patches/series    2017-07-29 
23:50:13.000000000 -0700
@@ -2,3 +2,4 @@
 tests-INC-fix.diff
 fix-build-with-opencv-3.1.diff
 bugfix-412.diff
+perl-5.26-compat.patch

Reply via email to