summaryrefslogtreecommitdiffstats
path: root/urpm/msg.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-04-19 17:10:12 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-04-19 17:10:12 +0000
commit22d3107b3224f91c04e8825ba8bc812dba63a7ef (patch)
treeee8f28bf683e7634a039909a7503cd3e7e53967f /urpm/msg.pm
parent7f79f78d1a0af648a116cd1e39a073e051502b9c (diff)
downloadurpmi-22d3107b3224f91c04e8825ba8bc812dba63a7ef.tar
urpmi-22d3107b3224f91c04e8825ba8bc812dba63a7ef.tar.gz
urpmi-22d3107b3224f91c04e8825ba8bc812dba63a7ef.tar.bz2
urpmi-22d3107b3224f91c04e8825ba8bc812dba63a7ef.tar.xz
urpmi-22d3107b3224f91c04e8825ba8bc812dba63a7ef.zip
Some more cleanup and refactorization.
Diffstat (limited to 'urpm/msg.pm')
-rw-r--r--urpm/msg.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/urpm/msg.pm b/urpm/msg.pm
index bf3272e2..5e367daa 100644
--- a/urpm/msg.pm
+++ b/urpm/msg.pm
@@ -3,7 +3,7 @@ package urpm::msg;
use strict;
use Exporter;
our @ISA = 'Exporter';
-our @EXPORT = qw(N log_it to_utf8 message_input gmessage message);
+our @EXPORT = qw(N log_it to_utf8 message_input gmessage message toMb);
my $noexpr = N("Nn");
my $yesexpr = N("Yy");
@@ -94,6 +94,13 @@ sub message {
}
}
+sub toMb {
+ my $nb = $_[0] / 1024 / 1024;
+ int $nb + 0.5;
+}
+
+sub localtime2changelog { scalar(localtime($_[0])) =~ /(.*) \S+ (\d{4})$/ && "$1 $2" };
+
1;
__END__