mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-10 13:28:12 -05: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:
parent
22c900e7d5
commit
bd43a7f155
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user