summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-04-30 08:26:54 +0200
committerAllan McRae <allan@archlinux.org>2012-12-14 04:45:12 +0100
commitda3a0333de34b37d073e1d27e9a07a7fa80025ee (patch)
tree0100a64f15f6bb3890b78fe90348099546f63930 /lib
parentad3a26c615dbc931275f0ee2f04879d867b06974 (diff)
downloadpacman-da3a0333de34b37d073e1d27e9a07a7fa80025ee.tar.gz
pacman-da3a0333de34b37d073e1d27e9a07a7fa80025ee.tar.xz
Extract .MTREE file into local package database
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index ecdccff0..7ef65308 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -164,6 +164,11 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive,
snprintf(filename, PATH_MAX, "%s%s-%s/changelog",
_alpm_db_path(handle->db_local), newpkg->name, newpkg->version);
archive_entry_set_perm(entry, 0644);
+ } else if(strcmp(entryname, ".MTREE") == 0) {
+ /* the mtree file goes inside the db */
+ snprintf(filename, PATH_MAX, "%s%s-%s/mtree",
+ _alpm_db_path(handle->db_local), newpkg->name, newpkg->version);
+ archive_entry_set_perm(entry, 0644);
} else if(*entryname == '.') {
/* for now, ignore all files starting with '.' that haven't
* already been handled (for future possibilities) */