diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-07-29 05:47:12 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-07-29 05:47:12 +0000 |
commit | 397eef2cc813b31547fb3676053519161e5ee0a2 (patch) | |
tree | a29305bd376111a663edf06c3c69e5a4fa569165 | |
parent | 2cdc54fb37c2b01f9ae797c76fe687ef53344d5d (diff) | |
download | rpmdrake-397eef2cc813b31547fb3676053519161e5ee0a2.tar rpmdrake-397eef2cc813b31547fb3676053519161e5ee0a2.tar.gz rpmdrake-397eef2cc813b31547fb3676053519161e5ee0a2.tar.bz2 rpmdrake-397eef2cc813b31547fb3676053519161e5ee0a2.tar.xz rpmdrake-397eef2cc813b31547fb3676053519161e5ee0a2.zip |
(extract_header) localize date fields in changelogs
-rwxr-xr-x | rpmdrake | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -262,7 +262,7 @@ sub extract_header { if ($MODE eq 'remove') { @$max_info_in_descr or return; add2hash($pkg, { files => [ split /\n/, chomp_(scalar(`rpm -ql $name`)) || N("(none)") ], - changelog => $chg_prepro->(scalar(`LC_ALL=C rpm -q --changelog $name`)) }); + changelog => $chg_prepro->(scalar(`rpm -q --changelog $name`)) }); } else { my ($p, $medium) = ($pkg->{pkg}, pkg2medium($pkg->{pkg}, $urpm)); my $hdlist = "$urpm->{statedir}/$medium->{hdlist}"; @@ -276,7 +276,7 @@ sub extract_header { $p->update_header("$headersdir/" . $p->header_filename) or log::l("Warning, could not extract header!"), goto header_non_available; rm_rf($headersdir); add2hash($pkg, { summary => rpm_summary($p->summary), description => rpm_description($p->description) }); - my $localtime2changelog = sub { scalar(localtime($_[0])) =~ /(.*) \S+ (\d{4})$/ && "$1 $2" }; + my $localtime2changelog = sub { strftime("%a %b %e %H:%M:%S %Y", localtime()) =~ /(.*) \S+ (\d{4})$/ && "$1 $2" }; @$max_info_in_descr and add2hash($pkg, { files => scalar($p->files) ? [ $p->files ] : [ N("(none)") ], changelog => $chg_prepro->(join("\n", mapn { "* ".$localtime2changelog->($_[2])." $_[0]\n\n$_[1]\n" } |