Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-12-26 06:40:29 +0000
committerJudd Vinet <judd@archlinux.org>2005-12-26 06:40:29 +0000
commit58c9d5d66387821260ba9bdd0815568039462f39 (patch)
treed2be58f9dd495c254d8fcefcc86f7fae1d1f0121 /lib/libalpm/db.c
parenta074ddb85b4d1f9b90842e5a4f15e2416e3147fe (diff)
applied first try at sync conflict handling (VMiklos) plus a couple changes
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c14
1 files changed, 14 insertions, 0 deletions
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);