summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2007-05-18 01:16:56 -0500
committerAaron Griffin <aaronmgriffin@gmail.com>2007-05-18 01:16:56 -0500
commit4e6b7c1cde4c0ac1d035b51f9af19510a7c9135e (patch)
tree17d77c66f7691f626a912096dacc48ef15c67cfa
parentc88037203b37bf5488f281618ff08442dd7261df (diff)
downloadpacman-4e6b7c1cde4c0ac1d035b51f9af19510a7c9135e.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>
-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 73c84cc0..ecc1142c 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -700,6 +700,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 */