index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2008-02-15 19:40:22 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-02-15 19:40:22 -0600 |
commit | 6b07b5d34512ef361ebf04395f07965cb80d0ec3 (patch) | |
tree | d67f27a25aeae00dedf5c6fab176576c06d1f5d9 /lib/libalpm/package.c | |
parent | a16608c6100e8620c03c94e34bb47256c2f5ee32 (diff) | |
parent | be95e4d8a008662eb0e19a3186953511551acec1 (diff) |
-rw-r--r-- | lib/libalpm/package.c | 7 |
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index b66fd85c..98417155 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -162,11 +162,12 @@ const char SYMEXPORT *alpm_pkg_get_filename(pmpkg_t *pkg) ASSERT(handle != NULL, return(NULL)); ASSERT(pkg != NULL, return(NULL)); + if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) { + _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC); + } + if(pkg->filename == NULL || strlen(pkg->filename) == 0) { /* construct the file name, it's not in the desc file */ - if(pkg->origin == PKG_FROM_CACHE && !(pkg->infolevel & INFRQ_DESC)) { - _alpm_db_read(pkg->origin_data.db, pkg, INFRQ_DESC); - } char buffer[PATH_MAX]; if(pkg->arch && strlen(pkg->arch) > 0) { snprintf(buffer, PATH_MAX, "%s-%s-%s" PKGEXT, |