From c6bcf87caf39c3d8b3712e877229d7ea5a9dcea5 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 14 Feb 2010 10:54:20 +0100 Subject: [PATCH] [entropy.security] fix Entropy Security cache dir handling, create it if not available --- libraries/entropy/security.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/entropy/security.py b/libraries/entropy/security.py index c2020230c..e313dd51a 100644 --- a/libraries/entropy/security.py +++ b/libraries/entropy/security.py @@ -166,6 +166,13 @@ class System: pass const_setup_perms(sec_dir, etpConst['entropygid']) + try: + if not os.path.isdir(System._CACHE_DIR): + os.makedirs(System._CACHE_DIR, 0o775) + except OSError: + pass + const_setup_perms(System._CACHE_DIR, etpConst['entropygid']) + if os.access(self.old_download_package_checksum, os.R_OK) and \ os.path.isfile(self.old_download_package_checksum):