do not try to download an empty db list
Starting the download process, even if there is nothing to actually download, causes an error when pacman is built without curl and has no XferCommand defined (like our test suite). Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
79227dabe0
commit
1c4e079899
1 changed files with 4 additions and 0 deletions
|
@ -198,6 +198,10 @@ int SYMEXPORT alpm_db_update(alpm_handle_t *handle, alpm_list_t *dbs, int force)
|
|||
payload->max_size = 128 * 1024 * 1024;
|
||||
payloads = alpm_list_add(payloads, payload);
|
||||
}
|
||||
if(payloads == NULL) {
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
event.type = ALPM_EVENT_DB_RETRIEVE_START;
|
||||
EVENT(handle, &event);
|
||||
|
|
Loading…
Add table
Reference in a new issue