mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-09 04:57:59 -05:00
- sync: populates *data when a conflict can't be resolved
- add: code cleanup
This commit is contained in:
parent
c2b27b5880
commit
db8a5e3586
@ -242,7 +242,11 @@ int add_prepare(pmtrans_t *trans, pmdb_t *db, PMList **data)
|
|||||||
if(!errorout) {
|
if(!errorout) {
|
||||||
errorout = 1;
|
errorout = 1;
|
||||||
}
|
}
|
||||||
MALLOC(miss, sizeof(pmdepmissing_t));
|
if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) {
|
||||||
|
FREELIST(lp);
|
||||||
|
FREELIST(*data);
|
||||||
|
RET_ERR(PM_ERR_MEMORY, -1);
|
||||||
|
}
|
||||||
*miss = *(pmdepmissing_t*)i->data;
|
*miss = *(pmdepmissing_t*)i->data;
|
||||||
*data = pm_list_add(*data, miss);
|
*data = pm_list_add(*data, miss);
|
||||||
}
|
}
|
||||||
|
@ -514,20 +514,34 @@ int sync_prepare(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync, PMList **
|
|||||||
/* abort */
|
/* abort */
|
||||||
_alpm_log(PM_LOG_ERROR, "package conflicts detected");
|
_alpm_log(PM_LOG_ERROR, "package conflicts detected");
|
||||||
errorout = 1;
|
errorout = 1;
|
||||||
|
if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) {
|
||||||
|
FREELIST(*data);
|
||||||
|
pm_errno = PM_ERR_MEMORY;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
*miss = *(pmdepmissing_t *)i->data;
|
||||||
|
*data = pm_list_add(*data, miss);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_alpm_log(PM_LOG_ERROR, "%s conflicts with %s", miss->target, miss->depend.name);
|
_alpm_log(PM_LOG_ERROR, "%s conflicts with %s", miss->target, miss->depend.name);
|
||||||
errorout = 1;
|
errorout = 1;
|
||||||
|
if((miss = (pmdepmissing_t *)malloc(sizeof(pmdepmissing_t))) == NULL) {
|
||||||
|
FREELIST(*data);
|
||||||
|
pm_errno = PM_ERR_MEMORY;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
*miss = *(pmdepmissing_t *)i->data;
|
||||||
|
*data = pm_list_add(*data, miss);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FREELIST(deps);
|
|
||||||
if(errorout) {
|
if(errorout) {
|
||||||
pm_errno = PM_ERR_CONFLICTING_DEPS;
|
pm_errno = PM_ERR_CONFLICTING_DEPS;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
FREELIST(deps);
|
||||||
}
|
}
|
||||||
EVENT(trans, PM_TRANS_EVT_INTERCONFLICTS_DONE, NULL, NULL);
|
EVENT(trans, PM_TRANS_EVT_INTERCONFLICTS_DONE, NULL, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user