summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortuxce <tuxce.net@gmail.com>2011-03-17 10:51:44 -0500
committerDan McGee <dan@archlinux.org>2011-03-17 10:51:44 -0500
commitb48f71841712d1839f5e900f1ec0fdf5665354ba (patch)
tree0bcc80e8682e31585dca601fea383cf400a86ed0
parente47fc2d7c6eb99a7b09393c6938ea47416cb88bc (diff)
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>
-rw-r--r--lib/libalpm/be_sync.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 6c0d2d67..ca76105f 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -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) {