From 833cfee02a1c48a13d4cc2d9ab4f2d51f173d397 Mon Sep 17 00:00:00 2001 From: lxnay Date: Thu, 1 May 2008 18:14:26 +0000 Subject: [PATCH] Entropy/ServerInterface: - fix expired packages handling git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1901 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/entropy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/entropy.py b/libraries/entropy.py index 56001e54f..94414efb9 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -15631,9 +15631,11 @@ class ServerMirrorsInterface: return True return False - def create_expiration_file(self, package_file, branch, repo = None): + def create_expiration_file(self, package_file, branch, repo = None, gentle = False): pkg_path = os.path.join(self.Entropy.get_local_packages_directory(repo),branch,package_file) pkg_path += etpConst['packagesexpirationfileext'] + if gentle and os.path.isfile(pkg_path): + return f = open(pkg_path,"w") f.flush() f.close() @@ -15697,7 +15699,7 @@ class ServerMirrorsInterface: if expired: removal.append(package) else: - self.create_expiration_file(package, mybranch, repo) + self.create_expiration_file(package, mybranch, repo, gentle = True) # fill returning data branch_data[mybranch]['removal'] = removal[:]