From 690ceeaa9db6455dbde631a03d87ffee3a18c0a5 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Mon, 15 Jun 2009 06:04:30 +0000 Subject: [PATCH] new call to calculate real download size --- pisi/api.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pisi/api.py b/pisi/api.py index cb38be4c..a2558a12 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -482,6 +482,14 @@ def snapshot(): historydb.update_history() +def calculate_download_size(packages): + """ + Returns the total download size and the cached size of the packages. + @param packages: list of package names -> list_of_strings + """ + total_size, cached_size = pisi.operations.helper.calculate_download_sizes(packages) + return total_size, cached_size + # ****** Danger Zone Below! Tressspassers' eyes will explode! ********** # def package_graph(A, packagedb, ignore_installed = False):