index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-06-07 20:42:15 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-24 03:46:12 -0500 |
commit | 79e98316ea89486d107466858543e965bcfbb0a9 (patch) | |
tree | e22572124cffc7275a200e4964c4ea112457fa52 /lib/libalpm/trans.c | |
parent | 1150d9e15aaea2ae1f259995d11442f491ef0af7 (diff) |
-rw-r--r-- | lib/libalpm/trans.c | 8 |
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index b4bdccfb..11a28e5c 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -101,11 +101,19 @@ int SYMEXPORT alpm_trans_init(pmhandle_t *handle, pmtransflag_t flags, alpm_trans_cb_progress progress) { pmtrans_t *trans; + alpm_list_t *i; /* Sanity checks */ CHECK_HANDLE(handle, return -1); ASSERT(handle->trans == NULL, RET_ERR(handle, PM_ERR_TRANS_NOT_NULL, -1)); + for(i = handle->dbs_sync; i; i = i->next) { + const pmdb_t *db = i->data; + if(!(db->status & DB_STATUS_VALID)) { + RET_ERR(handle, PM_ERR_DB_INVALID, -1); + } + } + /* lock db */ if(!(flags & PM_TRANS_FLAG_NOLOCK)) { if(make_lock(handle)) { |