aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/formatting.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-02-07 21:22:14 +0000
committerThierry Vignaud <tv@mageia.org>2012-02-07 21:22:14 +0000
commit30471ac7a60c358578d6fc63d1ebce22baa0912c (patch)
treea55fe34ffa2e4a4f54c83cf52214a9fe14fba414 /Rpmdrake/formatting.pm
parentb276471734a5aa247418c0700e2eb827ed517e61 (diff)
downloadrpmdrake-30471ac7a60c358578d6fc63d1ebce22baa0912c.tar
rpmdrake-30471ac7a60c358578d6fc63d1ebce22baa0912c.tar.gz
rpmdrake-30471ac7a60c358578d6fc63d1ebce22baa0912c.tar.bz2
rpmdrake-30471ac7a60c358578d6fc63d1ebce22baa0912c.tar.xz
rpmdrake-30471ac7a60c358578d6fc63d1ebce22baa0912c.zip
(format_filesize) introduce it
Diffstat (limited to 'Rpmdrake/formatting.pm')
-rw-r--r--Rpmdrake/formatting.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm
index 2bdfc67a..6a617778 100644
--- a/Rpmdrake/formatting.pm
+++ b/Rpmdrake/formatting.pm
@@ -43,6 +43,7 @@ our @EXPORT = qw(
format_list
format_name_n_summary
format_size
+ format_filesize
format_update_field
my_fullname
pkg2medium
@@ -167,6 +168,11 @@ sub format_size {
N("%s of disk space will be freed.", formatXiB(-$size));
}
+sub format_filesize {
+ my ($filesize) = @_;
+ $filesize ? N("%s of packages will be retrieved.", formatXiB($filesize)) : ();
+}
+
sub format_list { join("\n", map { s/^(\s)/ $1/mg; "- $_" } sort { uc($a) cmp uc($b) } @_) }
1;