Skip reading sync db deltas files if UseDelta is unset
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
711b6d3911
commit
17d4ec5ed8
1 changed files with 3 additions and 1 deletions
|
@ -535,7 +535,7 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0
|
if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0
|
||||||
|| strcmp(filename, "deltas") == 0) {
|
|| (strcmp(filename, "deltas") == 0 && db->handle->deltaratio > 0.0) ) {
|
||||||
int ret;
|
int ret;
|
||||||
while((ret = _alpm_archive_fgets(archive, &buf)) == ARCHIVE_OK) {
|
while((ret = _alpm_archive_fgets(archive, &buf)) == ARCHIVE_OK) {
|
||||||
char *line = buf.line;
|
char *line = buf.line;
|
||||||
|
@ -621,6 +621,8 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
*likely_pkg = pkg;
|
*likely_pkg = pkg;
|
||||||
|
} else if(strcmp(filename, "deltas") == 0) {
|
||||||
|
/* skip reading delta files if UseDelta is unset */
|
||||||
} else if(strcmp(filename, "files") == 0) {
|
} else if(strcmp(filename, "files") == 0) {
|
||||||
/* currently do nothing with this file */
|
/* currently do nothing with this file */
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue