Extract .MTREE file into local package database

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2012-04-30 16:26:54 +10:00
parent ad3a26c615
commit da3a0333de
1 changed files with 5 additions and 0 deletions

View File

@ -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) */