diff --git a/tools/update-packaging/common.sh b/tools/update-packaging/common.sh index 1b7d4ca7797b..b2e3562a6086 100755 --- a/tools/update-packaging/common.sh +++ b/tools/update-packaging/common.sh @@ -108,7 +108,7 @@ append_remove_instructions() { fixedprefix="" else f=$(echo $f | sed -e 's:^\.\.\/::') - fixedprefix=$(echo "$prefix" | sed -e 's:^[^\/]*\/::') + fixedprefix=$(echo "$prefix" | sed -e 's:[^\/]*\/$::') fi fi fi diff --git a/tools/update-packaging/make_incremental_updates.py b/tools/update-packaging/make_incremental_updates.py index 6a196d416bbf..3fe8ce317bd3 100755 --- a/tools/update-packaging/make_incremental_updates.py +++ b/tools/update-packaging/make_incremental_updates.py @@ -302,9 +302,15 @@ def process_explicit_remove_files(dir_path, patch_info): for line in lines: # Exclude any blank and comment lines. if line and not line.startswith("#"): + if prefix != "": + if line.startswith("../"): + line = line.replace("../../", "") + line = line.replace("../", "Contents/") + else: + line = os.path.join(prefix,line) # Python on windows uses \ for path separators and the update # manifests expects / for path separators on all platforms. - line=os.path.join(prefix,line).replace("\\", "/") + line = line.replace("\\", "/") patch_info.append_remove_instruction(line) def create_partial_patch(from_dir_path, to_dir_path, patch_filename, shas, patch_info, forced_updates):