Item13209: false alarm of corrupt .changes file

pencil
Priority: Urgent
Current State: Closed
Released In: 1.2.0
Target Release: minor
Applies To: Engine
Component:
Branches: master
Reported By: MichaelDaum
Waiting For:
Last Change By: CrawfordCurrie
Since the format of the .changes file has been changed to JSON I get the following error message:

Corrupt /var/www.../.changes: Can't locate Win32/Locale.pm in @INC

This is is caused by the mailnotify cronjob ... which nevertheless proceeds properly. The problem stems from CPAN:JSON defining the $@ variable after calling decode() ... which is a false alarm as the system is running under Linux. Whenever a json file is corrupt CPAN:JSON will call Carp::croak() and report the exact position where the error happened.

Above Win32::Locale warning seems to be caused by CPAN:JSON testing libraries ... at least that's what I presume. So it sets the $@ variable tested after calling decode(), yet still its value does not matter.

However the following test_json.pl does not show the same behavior.

#!/usr/bin/env perl

use JSON;

my $json = JSON->new->pretty(0);

...

my $data = readFile($file);
$json->decode($data);

print STDERR "woops: $@\n" if $@;

So there is something else setting $@ ... and I dunno what. Package versions:

  • JSON-2.90
  • JSON::XS-3.10
  • JSON:PP-2.27203

Crawford, any idea?

-- MichaelDaum - 13 Jan 2015

Missing eval. The $@ was probably hanging around from the dependency checks.

-- CrawfordCurrie - 15 Jan 2015

 

ItemTemplate edit

Summary false alarm of corrupt .changes file
ReportedBy MichaelDaum
Codebase
SVN Range
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:62463337784f
TargetRelease minor
ReleasedIn 1.2.0
CheckinsOnBranches master
trunkCheckins
masterCheckins distro:62463337784f
ItemBranchCheckins
Release01x01Checkins
Topic revision: r2 - 15 Jan 2015, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy