[entropy.const] move package delta subdir name to etpConst

This commit is contained in:
Fabio Erculiani
2010-12-07 20:14:02 +01:00
parent b75a3400e1
commit f3171344fe
2 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -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)