From 25efd91b9eec7755e4296591f531c923209dd1fa Mon Sep 17 00:00:00 2001
From: Simone Rota <sip@crux.nu>
Date: Sat, 2 Dec 2006 01:43:19 +0100
Subject: [PATCH] preserve owner/permissions when extracting

---
 pkgutil.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgutil.cc b/pkgutil.cc
index ce94501..b4d419b 100644
--- a/pkgutil.cc
+++ b/pkgutil.cc
@@ -422,7 +422,7 @@ void pkgutil::pkg_install(const string& filename, const set<string>& keep_list,
 		                           (real_filename.c_str()));
 
 		// Extract file
-		if (archive_read_extract(archive, entry, 0) !=
+		if (archive_read_extract(archive, entry, ARCHIVE_EXTRACT_OWNER && ARCHIVE_EXTRACT_PERM) !=
 		    ARCHIVE_OK) {
 			// If a file fails to install we just print an error message and
 			// continue trying to install the rest of the package.
-- 
2.45.2