1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

Correctly parse %DELTAS% entries in sync DB

We erroniously dropped the call to _alpm_delta_parse() when macro-izing,
causing segfaults for repos that provide deltas. Addresses FS#23314.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
tuxce 2011-03-17 10:51:44 -05:00 committed by Dan McGee
parent e47fc2d7c6
commit b48f718417

View File

@ -429,7 +429,12 @@ static int sync_db_read(pmdb_t *db, struct archive *archive,
} else if(strcmp(line, "%PROVIDES%") == 0) {
READ_AND_STORE_ALL(pkg->provides);
} else if(strcmp(line, "%DELTAS%") == 0) {
READ_AND_STORE_ALL(pkg->deltas);
/* Different than the rest because of the _alpm_delta_parse call. */
while(1) {
READ_NEXT(line);
if(strlen(line) == 0) break;
pkg->deltas = alpm_list_add(pkg->deltas, _alpm_delta_parse(line));
}
}
}
} else if(strcmp(filename, "files") == 0) {