summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-05-18 05:26:24 +0200
committerAaron Griffin <aaron@archlinux.org>2007-05-18 05:26:24 +0200
commit5786c6e4a31b75fdb07f1e1e43741910053f559f (patch)
treeb8dfd3de33c30d4a647361823f1c07fe8a7aaea7 /lib
parent6a0059ddd5e96617adf4200ad1f9f74545031c85 (diff)
downloadpacman-5786c6e4a31b75fdb07f1e1e43741910053f559f.tar.gz
pacman-5786c6e4a31b75fdb07f1e1e43741910053f559f.tar.xz
Fix libarchive permission extraction
Hackish fix to ensure libarchive extracts files and dirs with the right permissions. For some reason extracting /tmp on install wasn't handled properly by librachive, so an explicit chmod will fix this. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index ddeca317..c2b1286a 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -704,6 +704,8 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"), filename, strerror(errno));
alpm_logaction(_("error: could not extract %s (%s)"), filename, strerror(errno));
errors++;
+ } else {
+ chmod(filename, archive_entry_mode(entry));
}
/* calculate an hash if this is in newpkg's backup */