From fdd0d38cdd33aa11b176ea4e35f1697799c53806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Thu, 31 Mar 2011 11:37:57 +0000 Subject: [PATCH] build: Check max_count value --- pisi/operations/build.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pisi/operations/build.py b/pisi/operations/build.py index 7666f81c..522320a0 100644 --- a/pisi/operations/build.py +++ b/pisi/operations/build.py @@ -1160,10 +1160,10 @@ class Builder: search_paths = (ctx.config.compiled_packages_dir(), ctx.config.debug_packages_dir()) - if release is None: - self.delta_history_search_paths.append((search_paths, max_count)) - else: + if release: self.delta_search_paths[release] = search_paths + elif max_count > 0: + self.delta_history_search_paths.append((search_paths, max_count)) def build_delta_packages(self, package): @@ -1193,6 +1193,9 @@ class Builder: old_packages[old_release] = old_package for search_paths, max_count in self.delta_history_search_paths: + if max_count < 1: + continue + found_old_packages = {} for update in self.spec.history[1:]: if update.release in old_packages: