Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 175916 Details for
Bug 251687
mail-filter/spamassassin-fuzzyocr patches for tmpdir bug and . in fname bug
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for tmpdir bug
tmpdir-fix.patch (text/plain), 2.82 KB, created by
Heath Caldwell (RETIRED)
on 2008-12-20 00:45:24 UTC
(
hide
)
Description:
Patch for tmpdir bug
Filename:
MIME Type:
Creator:
Heath Caldwell (RETIRED)
Created:
2008-12-20 00:45:24 UTC
Size:
2.82 KB
patch
obsolete
>Submitted by: on (See http://fuzzyocr.own-hero.net/ticket/421) >Date: 2007-11-15 >Initial Package Version: 3.5.1 >Upstream Status: Accepted but no time to work on project any more >Description: From on: >I knew for sure something was not right in the way the function >get_tmpdir was running. After adding some tracing information, it shows that >the function always return the same value, instead of returning a value >depending on the image being analyzed. > >So this patch generates the temporary directory with File::Basename::dirname of >the input file whenever it is needed. The temporary file for analysis becomes >the temporary directory where the original image is saved. > >This seems to apply for the error in ticket #110 about pamthreshold error and >ticket #419 about gifsicle error. > >diff -ur FuzzyOcr.orig/Deanimate.pm FuzzyOcr/Deanimate.pm >--- FuzzyOcr.orig/Deanimate.pm Sun Jan 7 19:05:18 2007 >+++ FuzzyOcr/Deanimate.pm Thu Nov 15 13:19:00 2007 >@@ -8,13 +8,14 @@ > use FuzzyOcr::Config qw(get_config set_config get_tmpdir); > use FuzzyOcr::Misc qw(save_execute); > use FuzzyOcr::Logging qw(errorlog warnlog infolog); >+use File::Basename qw(dirname); > > # Provide functions to deanimate gifs > > sub deanimate { > my $conf = get_config(); >- my $imgdir = get_tmpdir(); > my $tfile = shift; >+ my $imgdir = dirname($tfile); > my $efile = $tfile . ".err"; > my $tfile2 = $tfile; > my $tfile3 = $tfile; >@@ -58,8 +59,8 @@ > > sub gif_info { > my $conf = get_config(); >- my $imgdir = get_tmpdir(); > my $giffile = $_[0]; >+ my $imgdir = dirname($giffile); > > my $fd = new IO::Handle; > >diff -ur FuzzyOcr.orig/Preprocessor.pm FuzzyOcr/Preprocessor.pm >--- FuzzyOcr.orig/Preprocessor.pm Sun Jan 7 19:05:18 2007 >+++ FuzzyOcr/Preprocessor.pm Thu Nov 15 12:31:05 2007 >@@ -1,5 +1,7 @@ > package FuzzyOcr::Preprocessor; > >+use File::Basename qw(dirname); >+ > sub new { > my ($class, $label, $command, $args) = @_; > >@@ -12,7 +14,7 @@ > > sub run { > my ($self, $input) = @_; >- my $tmpdir = FuzzyOcr::Config::get_tmpdir(); >+ my $tmpdir = dirname($input); > my $label = $self->{label}; > my $output = "$tmpdir/prep.$label.out"; > my $stderr = ">$tmpdir/prep.$label.err"; >diff -ur FuzzyOcr.orig/Scanset.pm FuzzyOcr/Scanset.pm >--- FuzzyOcr.orig/Scanset.pm Sun Jan 7 19:05:18 2007 >+++ FuzzyOcr/Scanset.pm Thu Nov 15 13:20:39 2007 >@@ -2,6 +2,7 @@ > > use lib qw(..); > use FuzzyOcr::Logging qw(errorlog); >+use File::Basename qw(dirname); > > sub new { > my ($class, $label, $preprocessors, $command, $args, $output_in) = @_; >@@ -19,7 +20,7 @@ > sub run { > my ($self, $input) = @_; > my $conf = FuzzyOcr::Config::get_config(); >- my $tmpdir = FuzzyOcr::Config::get_tmpdir(); >+ my $tmpdir = dirname($input); > my $label = $self->{label}; > my $output = "$tmpdir/scanset.$label.out"; > my $stderr = ">$tmpdir/scanset.$label.err";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251687
: 175916 |
175917
|
195701