Signed-off-by: Allan McRae <al...@archlinux.org> --- lib/libalpm/be_sync.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index f162199..a686def 100644 --- a/lib/libalpm/be_sync.c +++ b/lib/libalpm/be_sync.c @@ -511,7 +511,7 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive, } if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0 - || strcmp(filename, "deltas") == 0) { + || (strcmp(filename, "deltas") == 0 && db->handle->deltaratio > 0.0) ) { int ret; while((ret = _alpm_archive_fgets(archive, &buf)) == ARCHIVE_OK) { char *line = buf.line; @@ -585,6 +585,8 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive, goto error; } *likely_pkg = pkg; + } else if(strcmp(filename, "deltas") == 0) { + /* skip reading delta files if UseDelta is unset */ } else if(strcmp(filename, "files") == 0) { /* currently do nothing with this file */ } else { -- 1.7.9