From f3171344fee2f7182443a1e65be9b67ccd7a54e2 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Tue, 7 Dec 2010 20:14:02 +0100 Subject: [PATCH] [entropy.const] move package delta subdir name to etpConst --- libraries/entropy/const.py | 2 ++ libraries/entropy/tools.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/entropy/const.py b/libraries/entropy/const.py index 443b60c0f..7fe545ef4 100644 --- a/libraries/entropy/const.py +++ b/libraries/entropy/const.py @@ -425,6 +425,8 @@ def const_default_settings(rootdir): 'packagesext': ".tbz2", # entropy package files binary delta extension 'packagesdeltaext': ".edelta", + # entropy package files binary delta subdir + 'packagesdeltasubdir': "deltas", 'smartappsext': ".app", # Extension of the file that contains the checksum # of its releated package file diff --git a/libraries/entropy/tools.py b/libraries/entropy/tools.py index dfc2caa75..0bdb359ac 100644 --- a/libraries/entropy/tools.py +++ b/libraries/entropy/tools.py @@ -1114,7 +1114,6 @@ def _delta_extract_gzip(gzip_path, new_path_fd): item.flush() item.close() -_PKGDELTA_SUBDIR = "deltas" _BSDIFF_EXEC = "/usr/bin/bsdiff" _BSPATCH_EXEC = "/usr/bin/bspatch" _DELTA_DECOMPRESSION_MAP = { @@ -1168,7 +1167,8 @@ def generate_entropy_delta(pkg_path_a, pkg_path_b, pkg_compression = None): pkg_path_b_dir = os.path.dirname(pkg_path_b) delta_fn = generate_entropy_delta_file_name(pkg_path_a, pkg_path_b) - delta_file = os.path.join(pkg_path_b_dir, _PKGDELTA_SUBDIR, delta_fn) + delta_file = os.path.join(pkg_path_b_dir, + etpConst['packagesdeltasubdir'], delta_fn) delta_dir = os.path.dirname(delta_file) if not os.path.isdir(delta_dir): os.mkdir(delta_dir, 0o775)