From 58c9d5d66387821260ba9bdd0815568039462f39 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Mon, 26 Dec 2005 06:40:29 +0000 Subject: applied first try at sync conflict handling (VMiklos) plus a couple changes --- lib/libalpm/db.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/libalpm/db.c') diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 139bc3bb..cf3b63ea 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -348,6 +348,20 @@ int db_read(pmdb_t *db, char *name, unsigned int inforeq, pmpkg_t *info) if(fgets(info->md5sum, sizeof(info->md5sum), fp) == NULL) { return(-1); } + /* XXX: these are only here as backwards-compatibility for pacman 2.x + * sync repos.... in pacman3, they have been moved to DEPENDS. + * Remove this when we move to pacman3 repos. + */ + } else if(!strcmp(line, "%REPLACES%")) { + /* the REPLACES tag is special -- it only appears in sync repositories, + * not the local one. */ + while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) { + info->replaces = pm_list_add(info->replaces, strdup(line)); + } + } else if(!strcmp(line, "%FORCE%")) { + /* FORCE tag only appears in sync repositories, + * not the local one. */ + info->force = 1; } } fclose(fp); -- cgit v1.2.3