From 16e5da00a7a8153bce3005da5c7c0af8e8a802a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Mon, 21 Jun 2010 11:38:47 +0000 Subject: [PATCH] delta: Extract install archive into a sub-directory --- pisi/operations/delta.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pisi/operations/delta.py b/pisi/operations/delta.py index 2aa8c0d1..a02acf7c 100644 --- a/pisi/operations/delta.py +++ b/pisi/operations/delta.py @@ -50,7 +50,11 @@ def create_delta_package(old_package, new_package): newpkg_path = util.join_path(ctx.config.tmp_dir(), newpkg_name) newpkg.extract_pisi_files(newpkg_path) newpkg.extract_dir("comar", newpkg_path) - newpkg.extract_install(newpkg_path) + + install_dir = util.join_path(newpkg_path, "install") + util.clean_dir(install_dir) + os.mkdir(install_dir) + newpkg.extract_install(install_dir) # Create delta package deltaname = "%s-%s-%s%s" % (oldmd.package.name, @@ -86,6 +90,7 @@ def create_delta_package(old_package, new_package): # (commit r23485). files_delta.sort(key=lambda x: x.path) + os.chdir(install_dir) for f in files_delta: deltapkg.add_to_install(f.path)