Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-03-07 18:44:50 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-03-07 18:44:50 +0000
commit8f12ce618cbaa57945b62ab1d462620c316212dd (patch)
treeb63313a625a674d9bedbed474dcaa5df7b278d18
parent27be34c09bfe14ab0b4b2c96092ae0b60ca16555 (diff)
fixed reason loading if the pkg cache is loaded with DEPENDS only
-rw-r--r--lib/libalpm/add.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 80117731..687774db 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -318,6 +318,13 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
oldpkg->backup = _alpm_list_strdup(local->backup);
}
+ /* copy over the install reason */
+ if(!(local->infolevel & INFRQ_DESC)) {
+ _alpm_log(PM_LOG_DEBUG, "loading DESC info for '%s'", local->name);
+ _alpm_db_read(db, INFRQ_DESC, local);
+ }
+ info->reason = local->reason;
+
/* pre_upgrade scriptlet */
if(info->scriptlet && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {
_alpm_runscriptlet(handle->root, info->data, "pre_upgrade", info->version, oldpkg ? oldpkg->version : NULL);
@@ -334,8 +341,6 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
FREETRANS(tr);
RET_ERR(PM_ERR_TRANS_ABORT, -1);
}
- /* copy over the install reason */
- info->reason = local->reason;
if(_alpm_remove_loadtarget(tr, db, info->name) == -1) {
FREETRANS(tr);
RET_ERR(PM_ERR_TRANS_ABORT, -1);