index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-10-26 15:44:55 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-10-26 15:44:55 -0500 |
commit | 7a6b01d46c1da385dd34466e757beafa33e02afa (patch) | |
tree | 4594f93c0b362ccff0c38527f910b496f401fd9a /lib/libalpm | |
parent | 2da59e1aa91fa4160ec1c8ec84d94d8141b2a832 (diff) |
-rw-r--r-- | lib/libalpm/be_package.c | 18 |
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index c20c703f..c8e08e22 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -482,17 +482,19 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, newpkg->origin_data.file = strdup(pkgfile); newpkg->ops = get_file_pkg_ops(); newpkg->handle = handle; + newpkg->infolevel = INFRQ_BASE | INFRQ_DESC | INFRQ_SCRIPTLET; if(full) { - /* attempt to hand back any memory we don't need */ - files = realloc(files, sizeof(alpm_file_t) * files_count); - /* "checking for conflicts" requires a sorted list, ensure that here */ - _alpm_log(handle, ALPM_LOG_DEBUG, "sorting package filelist for %s\n", pkgfile); - newpkg->files.files = files_msort(files, files_count); + if(files) { + /* attempt to hand back any memory we don't need */ + files = realloc(files, sizeof(alpm_file_t) * files_count); + /* "checking for conflicts" requires a sorted list, ensure that here */ + _alpm_log(handle, ALPM_LOG_DEBUG, + "sorting package filelist for %s\n", pkgfile); + newpkg->files.files = files_msort(files, files_count); + } newpkg->files.count = files_count; - newpkg->infolevel = INFRQ_BASE | INFRQ_DESC | INFRQ_FILES | INFRQ_SCRIPTLET; - } else { - newpkg->infolevel = INFRQ_BASE | INFRQ_DESC | INFRQ_SCRIPTLET; + newpkg->infolevel |= INFRQ_FILES; } return newpkg; |