[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#855071: marked as done (unblock: gscan2pdf/1.6.0-5)



Your message dated Mon, 13 Feb 2017 21:41:06 +0000
with message-id <E1cdOMs-0000md-JG@respighi.debian.org>
and subject line unblock gscan2pdf
has caused the Debian Bug report #855071,
regarding unblock: gscan2pdf/1.6.0-5
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
855071: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855071
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package gscan2pdf

v1.6.0-5 fixes bugs 854956 and 854957 (normal severity)

debdiff attached

unblock gscan2pdf/1.6.0-5

-- System Information:
Debian Release: 9.0
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
diff -Nru gscan2pdf-1.6.0/debian/changelog gscan2pdf-1.6.0/debian/changelog
--- gscan2pdf-1.6.0/debian/changelog	2017-01-15 15:52:43.000000000 +0100
+++ gscan2pdf-1.6.0/debian/changelog	2017-02-12 16:01:45.000000000 +0100
@@ -1,3 +1,10 @@
+gscan2pdf (1.6.0-5) unstable; urgency=low
+
+  * Closes: #854956 (fails to reload settings after scanning for devices)
+  * Closes: #854957 (rounding error from scanimage causes device to be rejected)
+
+ -- Jeffrey Ratcliffe <jjr@debian.org>  Sun, 12 Feb 2017 16:01:45 +0100
+
 gscan2pdf (1.6.0-4) unstable; urgency=low
 
   * + patch to fix bug attaching PDF to email
diff -Nru gscan2pdf-1.6.0/debian/patches/0001-Suppress-errors-from-CLI-frontends-caused-by-roundin.patch gscan2pdf-1.6.0/debian/patches/0001-Suppress-errors-from-CLI-frontends-caused-by-roundin.patch
--- gscan2pdf-1.6.0/debian/patches/0001-Suppress-errors-from-CLI-frontends-caused-by-roundin.patch	1970-01-01 01:00:00.000000000 +0100
+++ gscan2pdf-1.6.0/debian/patches/0001-Suppress-errors-from-CLI-frontends-caused-by-roundin.patch	2017-02-12 15:57:17.000000000 +0100
@@ -0,0 +1,204 @@
+From 09e3583ba0a88e70b2925c46497baee231687ac3 Mon Sep 17 00:00:00 2001
+From: Jeffrey Ratcliffe <Jeffrey.Ratcliffe@gmail.com>
+Date: Mon, 30 Jan 2017 20:35:50 +0100
+Subject: [PATCH 1/2] Suppress errors from CLI frontends caused by rounding
+
+---
+ History                       |   5 ++
+ MANIFEST                      |   1 +
+ lib/Gscan2pdf/Frontend/CLI.pm |  17 +++--
+ t/06293_Dialog_Scan_CLI.t     | 151 ++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 169 insertions(+), 5 deletions(-)
+ create mode 100644 t/06293_Dialog_Scan_CLI.t
+
+--- a/MANIFEST
++++ b/MANIFEST
+@@ -176,6 +176,7 @@
+ t/06290_Dialog_Scan_CLI.t
+ t/06291_Dialog_Scan_CLI.t
+ t/06292_Dialog_Scan_CLI.t
++t/06293_Dialog_Scan_CLI.t
+ t/06295_Dialog_Scan_CLI.t
+ t/07_Dialog_Renumber.t
+ t/081_Frontend_CLI.t
+--- a/lib/Gscan2pdf/Frontend/CLI.pm
++++ b/lib/Gscan2pdf/Frontend/CLI.pm
+@@ -108,12 +108,19 @@
+         running_callback  => $options{running_callback},
+         finished_callback => sub {
+             my ( $output, $error ) = @_;
+-            if ( defined $error and $error =~ /^$options{frontend}:[ ](.*)/xsm )
+-            {
+-                $error = $1;
+-            }
+             if ( defined $error and defined $options{error_callback} ) {
+-                $options{error_callback}->($error);
++                while ( $error =~ /([\r\n])/xsm ) {
++                    my $le = $1;
++                    my $line = substr $error, 0, index $error, $le;
++                    $error = substr $error, index( $error, $le ) + 1,
++                      length $error;
++                    if ( $line =~ /^$options{frontend}:[ ](.*)/xsm ) {
++                        my $msg = $1;
++                        if ( $msg !~ /rounded/xsm ) {
++                            $options{error_callback}->($msg);
++                        }
++                    }
++                }
+             }
+             my $options = Gscan2pdf::Scanner::Options->new_from_data($output);
+             $_self->{device_name} = Gscan2pdf::Scanner::Options->device;
+--- /dev/null
++++ b/t/06293_Dialog_Scan_CLI.t
+@@ -0,0 +1,151 @@
++use warnings;
++use strict;
++use Test::More tests => 1;
++use Glib qw(TRUE FALSE);    # To get TRUE and FALSE
++use Gtk2 -init;             # Could just call init separately
++use Sane 0.05;              # To get SANE_* enums
++use Sub::Override;          # Override Frontend::CLI to test functionality that
++                            # we can't with the test backend
++
++BEGIN {
++    use Gscan2pdf::Dialog::Scan::CLI;
++}
++
++#########################
++
++my $window = Gtk2::Window->new;
++
++Glib::set_application_name('gscan2pdf');
++use Log::Log4perl qw(:easy);
++Log::Log4perl->easy_init($FATAL);
++my $logger = Log::Log4perl::get_logger;
++
++my $help_out = <<'EOS';
++Usage: scanimage [OPTION]...
++
++Start image acquisition on a scanner device and write PNM image data to standard output.
++
++-d, --device-name=DEVICE   use a given scanner device (e.g. hp:/dev/scanner)
++    --format=pnm|tiff      file format of output file
++-i, --icc-profile=PROFILE  include this ICC profile into TIFF file
++-L, --list-devices         show available scanner devices
++-f, --formatted-device-list=FORMAT similar to -L, but the FORMAT of the output
++                           can be specified: %d (device name), %v (vendor),
++                           %m (model), %t (type), and %i (index number)
++-b, --batch[=FORMAT]       working in batch mode, FORMAT is `out%d.pnm' or
++                           `out%d.tif' by default depending on --format
++    --batch-start=#        page number to start naming files with
++    --batch-count=#        how many pages to scan in batch mode
++    --batch-increment=#    increase number in filename by an amount of #
++    --batch-double         increment page number by two for 2sided originals
++                           being scanned in a single sided scanner
++    --batch-prompt         ask for pressing a key before scanning a page
++    --accept-md5-only      only accept authorization requests using md5
++-p, --progress             print progress messages
++-n, --dont-scan            only set options, don't actually scan
++-T, --test                 test backend thoroughly
++-h, --help                 display this help message and exit
++-v, --verbose              give even more status messages
++-B, --buffer-size          change default input buffersize
++-V, --version              print version information
++
++Options specific to device `fujitsu:libusb:002:004':
++  Scan Mode:
++    --source ADF Front|ADF Back|ADF Duplex [ADF Front]
++        Selects the scan source (such as a document-feeder).
++    --mode Gray|Color [Gray]
++        Selects the scan mode (e.g., lineart, monochrome, or color).
++    --resolution 100..600dpi (in steps of 1) [600]
++        Sets the horizontal resolution of the scanned image.
++    --y-resolution 50..600dpi (in steps of 1) [600]
++        Sets the vertical resolution of the scanned image.
++  Geometry:
++    -l 0..224.846mm (in steps of 0.0211639) [0]
++        Top-left x position of scan area.
++    -t 0..863.489mm (in steps of 0.0211639) [0]
++        Top-left y position of scan area.
++    -x 0..224.846mm (in steps of 0.0211639) [215.872]
++        Width of scan-area.
++    -y 0..863.489mm (in steps of 0.0211639) [279.364]
++        Height of scan-area.
++    --pagewidth 0..224.846mm (in steps of 0.0211639) [215.872]
++        Must be set properly to align scanning window
++    --pageheight 0..863.489mm (in steps of 0.0211639) [279.364]
++        Must be set properly to eject pages
++  Enhancement:
++    --rif[=(yes|no)] [no]
++        Reverse image format
++  Advanced:
++    --dropoutcolor Default|Red|Green|Blue [Default]
++        One-pass scanners use only one color during gray or binary scanning,
++        useful for colored paper or ink
++    --sleeptimer 0..60 (in steps of 1) [0]
++        Time in minutes until the internal power supply switches to sleep mode
++  Sensors and Buttons:
++
++Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.
++
++List of available devices:
++   fujitsu:libusb:002:004
++EOS
++
++my $help_err = <<'EOS';
++scanimage: rounded value of br-x from 215.872 to 215.872
++scanimage: big ugly error
++EOS
++
++my $override = Sub::Override->new;
++$override->replace(
++    'Gscan2pdf::Frontend::CLI::_watch_cmd' => sub {
++        my (%options) = @_;
++        $options{started_callback}->();
++        $options{finished_callback}->( $help_out, $help_err );
++    }
++);
++
++Gscan2pdf::Frontend::CLI->setup($logger);
++
++my $dialog = Gscan2pdf::Dialog::Scan::CLI->new(
++    title           => 'title',
++    'transient-for' => $window,
++    'logger'        => $logger
++);
++$dialog->signal_connect(
++    'process-error' => sub {
++        my ( $widget, $process, $msg, $signal ) = @_;
++        $logger->debug( 'process-error', $widget, $process, $msg, $signal );
++        is( $msg, 'big ugly error', 'process-error ignored rounding' );
++    }
++);
++
++$dialog->signal_connect(
++    'reloaded-scan-options' => sub {
++        Gtk2->main_quit;
++    }
++);
++
++my $signal = $dialog->signal_connect(
++    'changed-device-list' => sub {
++
++        my $signal;
++        $signal = $dialog->signal_connect(
++            'changed-device' => sub {
++                my ( $widget, $name ) = @_;
++                $dialog->signal_handler_disconnect($signal);
++            }
++        );
++        $dialog->set( 'device', 'fujitsu:libusb:002:004' );
++    }
++);
++
++# give gtk a chance to hit the main loop before starting
++Glib::Idle->add(
++    sub {
++        $dialog->set( 'device-list',
++            [ { 'name' => 'fujitsu:libusb:002:004' } ] );
++    }
++);
++
++Gtk2->main;
++
++__END__
diff -Nru gscan2pdf-1.6.0/debian/patches/0002-Reload-default-scan-settings-after-rescanning-for-de.patch gscan2pdf-1.6.0/debian/patches/0002-Reload-default-scan-settings-after-rescanning-for-de.patch
--- gscan2pdf-1.6.0/debian/patches/0002-Reload-default-scan-settings-after-rescanning-for-de.patch	1970-01-01 01:00:00.000000000 +0100
+++ gscan2pdf-1.6.0/debian/patches/0002-Reload-default-scan-settings-after-rescanning-for-de.patch	2017-02-12 15:58:28.000000000 +0100
@@ -0,0 +1,35 @@
+From 61cdfba68ecfa7849939defe7b4acfe706853790 Mon Sep 17 00:00:00 2001
+From: Jeffrey Ratcliffe <Jeffrey.Ratcliffe@gmail.com>
+Date: Wed, 1 Feb 2017 20:24:04 +0100
+Subject: [PATCH 2/2] Reload default scan settings after rescanning for devices
+
+---
+ History       | 1 +
+ bin/gscan2pdf | 9 +++++----
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+--- a/bin/gscan2pdf
++++ b/bin/gscan2pdf
+@@ -3582,10 +3582,6 @@
+         }
+     );
+ 
+-    # Can't set the profile until the options have been loaded
+-    $windows->{reloaded_signal} = $windows->signal_connect(
+-        'reloaded-scan-options' => \&reloaded_scan_options_callback );
+-
+     $windows->signal_connect(
+         'changed-paper-formats' => sub {
+             my ( $widget, $formats ) = @_;
+@@ -3621,6 +3617,11 @@
+     else {
+         $logger->info("signal 'changed-device' emitted with data: undef");
+     }
++
++    # Can't set the profile until the options have been loaded. This
++    # should only be called the first time after loading the available options
++    $windows->{reloaded_signal} = $windows->signal_connect(
++        'reloaded-scan-options' => \&reloaded_scan_options_callback );
+     return;
+ }
+ 
diff -Nru gscan2pdf-1.6.0/debian/patches/series gscan2pdf-1.6.0/debian/patches/series
--- gscan2pdf-1.6.0/debian/patches/series	2017-01-11 21:09:25.000000000 +0100
+++ gscan2pdf-1.6.0/debian/patches/series	2017-02-12 15:58:12.000000000 +0100
@@ -2,3 +2,5 @@
 0002-Catch-error-setting-timestamp-for-dates-prior-to-197.patch
 0001-Fix-saving-TIFF-with-compression.patch
 0001-Fixed-bug-attaching-PDF-to-email.patch
+0001-Suppress-errors-from-CLI-frontends-caused-by-roundin.patch
+0002-Reload-default-scan-settings-after-rescanning-for-de.patch

--- End Message ---
--- Begin Message ---
Unblocked.

--- End Message ---

Reply to: