Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-12-08 00:17:34 +0100
committerDan McGee <dan@archlinux.org>2008-01-23 20:12:50 -0600
commitbd43a7f155cbd54d58fb45285e2eef1f51c88b00 (patch)
treee93d1550d91a2d06f679340406095a2594ccaf29 /src/util
parent22c900e7d57bfa7c9ed482f888ef200c0289ceec (diff)
testdb : add conflicts checking.
Testdb will now scan the local database to check there are no conflicts. I'm not sure how it's possible to get this situation. At least pacman doesn't allow installing a package that conflicts with a local one, without removing the local one. But maybe in a very weird situation, or because of a bug, it could be possible. But anyway, this only requires 5 lines of code. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/testdb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/testdb.c b/src/util/testdb.c
index 122a3fb5..f354ecab 100644
--- a/src/util/testdb.c
+++ b/src/util/testdb.c
@@ -147,6 +147,14 @@ int main(int argc, char **argv)
free(depstring);
}
+ /* check conflicts */
+ data = alpm_checkdbconflicts(db);
+ for(i = data; i; i = i->next) {
+ pmconflict_t *conflict = alpm_list_getdata(i);
+ printf("%s conflicts with %s\n", alpm_conflict_get_package1(conflict),
+ alpm_conflict_get_package2(conflict));
+ }
+
cleanup(retval);
}