Bug 185192 - cpanspec should not output dates according to locale
cpanspec should not output dates according to locale
Product: Fedora
Classification: Fedora
Component: cpanspec (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Steven Pritchard
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2006-03-11 10:38 EST by Roy-Magne Mo
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.61-1.fc5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-11 15:44:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Roy-Magne Mo 2006-03-11 10:38:32 EST
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):

How reproducible:

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

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 10:38:33 EST
Created attachment 125996 [details]
patch to set locale
Comment 2 Steven Pritchard 2006-03-11 15:44:27 EST
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.