mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 03:54:59 -05:00
fixed a segfault that occured in special cases when propagating requiredby fields during package replacements
This commit is contained in:
parent
ff50305a02
commit
cebc7ace60
@ -590,6 +590,13 @@ int sync_commit(pmtrans_t *trans, pmdb_t *db_local)
|
|||||||
/* replace old's name with new's name in the requiredby's dependency list */
|
/* replace old's name with new's name in the requiredby's dependency list */
|
||||||
PMList *m;
|
PMList *m;
|
||||||
pmpkg_t *depender = db_get_pkgfromcache(db_local, k->data);
|
pmpkg_t *depender = db_get_pkgfromcache(db_local, k->data);
|
||||||
|
if(depender == NULL) {
|
||||||
|
/* If the depending package no longer exists in the local db,
|
||||||
|
* then it must have ALSO conflicted with sync->pkg. If
|
||||||
|
* that's the case, then we don't have anything to propagate
|
||||||
|
* here. */
|
||||||
|
continue;
|
||||||
|
}
|
||||||
for(m = depender->depends; m; m = m->next) {
|
for(m = depender->depends; m; m = m->next) {
|
||||||
if(!strcmp(m->data, old->name)) {
|
if(!strcmp(m->data, old->name)) {
|
||||||
FREE(m->data);
|
FREE(m->data);
|
||||||
|
Loading…
Reference in New Issue
Block a user