mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-10 11:35:00 -05:00
Remove some null checks in _alpm_checkdeps
Hopefully these are unnecessary, as they were probably added originally to cover up a problem instead of finding the root cause. I'd rather fail hard in these cases anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
2ed6b482d2
commit
e95e346ac7
@ -264,10 +264,6 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(pmdb_t *db, int reversedeps,
|
|||||||
/* look for unsatisfied dependencies of the upgrade list */
|
/* look for unsatisfied dependencies of the upgrade list */
|
||||||
for(i = upgrade; i; i = i->next) {
|
for(i = upgrade; i; i = i->next) {
|
||||||
pmpkg_t *tp = i->data;
|
pmpkg_t *tp = i->data;
|
||||||
if(tp == NULL) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "null package found in upgrade list\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "checkdeps: package %s-%s\n",
|
_alpm_log(PM_LOG_DEBUG, "checkdeps: package %s-%s\n",
|
||||||
alpm_pkg_get_name(tp), alpm_pkg_get_version(tp));
|
alpm_pkg_get_name(tp), alpm_pkg_get_version(tp));
|
||||||
|
|
||||||
@ -279,7 +275,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(pmdb_t *db, int reversedeps,
|
|||||||
!alpm_list_find(dblist, depend, satisfycmp)) {
|
!alpm_list_find(dblist, depend, satisfycmp)) {
|
||||||
/* Unsatisfied dependency in the upgrade list */
|
/* Unsatisfied dependency in the upgrade list */
|
||||||
char *missdepstring = alpm_dep_get_string(depend);
|
char *missdepstring = alpm_dep_get_string(depend);
|
||||||
_alpm_log(PM_LOG_DEBUG, "missing dependency '%s' for package '%s'\n",
|
_alpm_log(PM_LOG_DEBUG, "checkdeps: missing dependency '%s' for package '%s'\n",
|
||||||
missdepstring, alpm_pkg_get_name(tp));
|
missdepstring, alpm_pkg_get_name(tp));
|
||||||
free(missdepstring);
|
free(missdepstring);
|
||||||
miss = _alpm_depmiss_new(alpm_pkg_get_name(tp), depend->mod,
|
miss = _alpm_depmiss_new(alpm_pkg_get_name(tp), depend->mod,
|
||||||
@ -297,10 +293,6 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(pmdb_t *db, int reversedeps,
|
|||||||
|
|
||||||
for(i = dblist; i; i = i->next) {
|
for(i = dblist; i; i = i->next) {
|
||||||
pmpkg_t *lp = i->data;
|
pmpkg_t *lp = i->data;
|
||||||
if(lp == NULL) {
|
|
||||||
_alpm_log(PM_LOG_DEBUG, "null package found in localdb pkgcache\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
for(j = alpm_pkg_get_depends(lp); j; j = j->next) {
|
for(j = alpm_pkg_get_depends(lp); j; j = j->next) {
|
||||||
pmdepend_t *depend = j->data;
|
pmdepend_t *depend = j->data;
|
||||||
/* we won't break this depend, if it is already broken, we ignore it */
|
/* we won't break this depend, if it is already broken, we ignore it */
|
||||||
@ -310,7 +302,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(pmdb_t *db, int reversedeps,
|
|||||||
!alpm_list_find(upgrade, depend, satisfycmp) &&
|
!alpm_list_find(upgrade, depend, satisfycmp) &&
|
||||||
!alpm_list_find(dblist, depend, satisfycmp)) {
|
!alpm_list_find(dblist, depend, satisfycmp)) {
|
||||||
char *missdepstring = alpm_dep_get_string(depend);
|
char *missdepstring = alpm_dep_get_string(depend);
|
||||||
_alpm_log(PM_LOG_DEBUG, "checkdeps: the transaction would break '%s' dependency of '%s'\n",
|
_alpm_log(PM_LOG_DEBUG, "checkdeps: transaction would break '%s' dependency of '%s'\n",
|
||||||
missdepstring, alpm_pkg_get_name(lp));
|
missdepstring, alpm_pkg_get_name(lp));
|
||||||
free(missdepstring);
|
free(missdepstring);
|
||||||
miss = _alpm_depmiss_new(lp->name, depend->mod,
|
miss = _alpm_depmiss_new(lp->name, depend->mod,
|
||||||
|
Loading…
Reference in New Issue
Block a user