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

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>
This commit is contained in:
Chantry Xavier 2007-12-08 00:17:34 +01:00 committed by Dan McGee
parent 22c900e7d5
commit bd43a7f155

View File

@ -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);
}