Bug 185192 - cpanspec should not output dates according to locale
Summary: cpanspec should not output dates according to locale
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cpanspec
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Steven Pritchard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-11 15:38 UTC by Roy-Magne Mo
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 1.61-1.fc5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-11 20:44:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to set locale (638 bytes, patch)
2006-03-11 15:38 UTC, Roy-Magne Mo
no flags Details | Diff

Description Roy-Magne Mo 2006-03-11 15:38:32 UTC
Description of problem:
cpanspec writes out dates according to locale. If this output differs from POSIX
 the spec file will be rejected by rpmbuild.

Version-Release number of selected component (if applicable):
cpanspec-1.60-1.fc5

How reproducible:
always

Steps to Reproduce:
1. LC_ALL=nn_NO.UTF-8 cpanspec --verbose --packager="Roy-Magne Mo
<rmo>" YAML 
2.
3.
  
Actual results:
%changelog
* lau  mar 11 2006 Roy-Magne Mo <rmo> 0.58-1
# rpmbuild -ba perl-YAML.spec
error: bad date in %changelog: lau  mar 11 2006 Roy-Magne Mo <rmo>
0.58-1


Expected results:
cpanspec should write the date according to POSIX (I guess) 

Additional info:

I see two ways to solve this, the first is the attached patch which sets the
locale for cpanspec as a whole, this will break localization.

The other:
1. get current locale
2. store this in a variable 
3. create the date with strftime() 
4. restore locale

Comment 1 Roy-Magne Mo 2006-03-11 15:38:33 UTC
Created attachment 125996 [details]
patch to set locale

Comment 2 Steven Pritchard 2006-03-11 20:44:27 UTC
Given that pretty much nothing in the generated spec is locale-aware, I'm
inclined to agree with your fix.

This will be fixed in 1.61, which I'm pushing out now.


Note You need to log in before you can comment on or make changes to this bug.