feat: back to baseline, starting the new development
This commit is contained in:
parent
a5676fd329
commit
04bf4511f6
2 changed files with 3 additions and 16 deletions
|
@ -307,8 +307,6 @@ typedef enum _alpm_errno_t {
|
||||||
ALPM_ERR_CONFLICTING_DEPS,
|
ALPM_ERR_CONFLICTING_DEPS,
|
||||||
/** Files conflict */
|
/** Files conflict */
|
||||||
ALPM_ERR_FILE_CONFLICTS,
|
ALPM_ERR_FILE_CONFLICTS,
|
||||||
/** Removing optdepends of another dependency*/
|
|
||||||
ALPM_ERR_REMOVING_OPTDEPENDS_DEPS,
|
|
||||||
/* Misc */
|
/* Misc */
|
||||||
/** Download failed */
|
/** Download failed */
|
||||||
ALPM_ERR_RETRIEVE,
|
ALPM_ERR_RETRIEVE,
|
||||||
|
|
|
@ -161,13 +161,10 @@ static void remove_prepare_keep_needed(alpm_handle_t *handle, alpm_list_t *lp)
|
||||||
*
|
*
|
||||||
* @param handle the context handle
|
* @param handle the context handle
|
||||||
* @param lp list of packages to be removed
|
* @param lp list of packages to be removed
|
||||||
*
|
|
||||||
* @return false when no optdepends of other packages are going to be removed, true in case it will remove optdepends of other packages
|
|
||||||
*/
|
*/
|
||||||
static alpm_list_t remove_notify_needed_optdepends(alpm_handle_t *handle, alpm_list_t *lp)
|
static void remove_notify_needed_optdepends(alpm_handle_t *handle, alpm_list_t *lp)
|
||||||
{
|
{
|
||||||
alpm_list_t *i;
|
alpm_list_t *i;
|
||||||
alpm_list_t *result = NULL;
|
|
||||||
|
|
||||||
for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = alpm_list_next(i)) {
|
for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = alpm_list_next(i)) {
|
||||||
alpm_pkg_t *pkg = i->data;
|
alpm_pkg_t *pkg = i->data;
|
||||||
|
@ -184,15 +181,12 @@ static alpm_list_t remove_notify_needed_optdepends(alpm_handle_t *handle, alpm_l
|
||||||
.pkg = pkg,
|
.pkg = pkg,
|
||||||
.optdep = optdep
|
.optdep = optdep
|
||||||
};
|
};
|
||||||
alpm_list_add(result, j->data);
|
|
||||||
EVENT(handle, &event);
|
EVENT(handle, &event);
|
||||||
}
|
}
|
||||||
free(optstring);
|
free(optstring);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return *result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -213,7 +207,6 @@ int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
||||||
alpm_trans_t *trans = handle->trans;
|
alpm_trans_t *trans = handle->trans;
|
||||||
alpm_db_t *db = handle->db_local;
|
alpm_db_t *db = handle->db_local;
|
||||||
alpm_event_t event;
|
alpm_event_t event;
|
||||||
alpm_list_t optdep_to_keep;
|
|
||||||
|
|
||||||
if((trans->flags & ALPM_TRANS_FLAG_RECURSE)
|
if((trans->flags & ALPM_TRANS_FLAG_RECURSE)
|
||||||
&& !(trans->flags & ALPM_TRANS_FLAG_CASCADE)) {
|
&& !(trans->flags & ALPM_TRANS_FLAG_CASCADE)) {
|
||||||
|
@ -264,12 +257,8 @@ int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note packages being removed that are optdepends for installed packages */
|
/* Note packages being removed that are optdepends for installed packages */
|
||||||
if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)
|
if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)) {
|
||||||
&& !(trans->flags & ALPM_TRANS_FLAG_RECURSEALL)
|
remove_notify_needed_optdepends(handle, trans->remove);
|
||||||
&& (trans->flags & ALPM_TRANS_FLAG_RECURSE)) {
|
|
||||||
optdep_to_keep = remove_notify_needed_optdepends(handle, trans->remove);
|
|
||||||
alpm_list_remove_item(trans->remove, &optdep_to_keep);
|
|
||||||
alpm_list_free(&optdep_to_keep);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)) {
|
if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue