aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrpmdrake5
1 files changed, 3 insertions, 2 deletions
diff --git a/rpmdrake b/rpmdrake
index e0c8dc5d..a864f250 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -252,6 +252,8 @@ sub pkg2medium {
$tmp;
}
+sub localtime2changelog { strftime("%a %b %e %Y", localtime($_[0])) }
+
sub extract_header {
my ($pkg, $urpm) = @_;
my $chg_prepro = sub {
@@ -276,10 +278,9 @@ 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 { 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" }
+ changelog => $chg_prepro->(join("\n", mapn { "* ".localtime2changelog($_[2])." $_[0]\n\n$_[1]\n" }
[ $p->changelog_name ], [ $p->changelog_text ], [ $p->changelog_time ])) });
$p->pack_header;
} else {