- } else {
- opkg_message(conf, OPKG_DEBUG, "not installing %s due to broken depends \n", pkg_scout->name);
- free (newstuff);
- }
- }
- }
- }
- }
-
- continue;
- }
-
- /* foreach possible satisfier, look for installed package */
- for (j = 0; j < compound_depend->possibility_count; j++) {
- /* foreach provided_by, which includes the abstract_pkg itself */
- depend_t *dependence_to_satisfy = possible_satisfiers[j];
- abstract_pkg_t *satisfying_apkg = possible_satisfiers[j]->pkg;
- pkg_t *satisfying_pkg =
- pkg_hash_fetch_best_installation_candidate(conf, satisfying_apkg,
- pkg_installed_and_constraint_satisfied,
- dependence_to_satisfy, 1, NULL);
- /* Being that I can't test constraing in pkg_hash, I will test it here */
- if (satisfying_pkg != NULL) {
- if (!pkg_installed_and_constraint_satisfied ( satisfying_pkg,dependence_to_satisfy)) {
- satisfying_pkg = NULL;
- }
- }
- opkg_message(conf, OPKG_DEBUG, "%s:%d: satisfying_pkg=%p \n", __FILE__, __LINE__, satisfying_pkg);
- if (satisfying_pkg != NULL) {
- found = 1;
- break;
- }
-
- }
- /* if nothing installed matches, then look for uninstalled satisfier */
- if (!found) {
- /* foreach possible satisfier, look for installed package */
- for (j = 0; j < compound_depend->possibility_count; j++) {
- /* foreach provided_by, which includes the abstract_pkg itself */
- depend_t *dependence_to_satisfy = possible_satisfiers[j];
- abstract_pkg_t *satisfying_apkg = possible_satisfiers[j]->pkg;
- pkg_t *satisfying_pkg =
- pkg_hash_fetch_best_installation_candidate(conf, satisfying_apkg,
- pkg_constraint_satisfied,
- dependence_to_satisfy, 1, NULL);
- /* Being that I can't test constraing in pkg_hash, I will test it here too */
- if (satisfying_pkg != NULL) {
- if (!pkg_constraint_satisfied ( satisfying_pkg,dependence_to_satisfy)) {
- satisfying_pkg = NULL;
- }
- }
-
- /* user request overrides package recommendation */
- if (satisfying_pkg != NULL
- && (compound_depend->type == RECOMMEND || compound_depend->type == SUGGEST)
- && (satisfying_pkg->state_want == SW_DEINSTALL || satisfying_pkg->state_want == SW_PURGE)) {
- opkg_message (conf, OPKG_NOTICE, "%s: ignoring recommendation for %s at user request\n",
- pkg->name, satisfying_pkg->name);
- continue;
- }
-
- opkg_message(conf, OPKG_DEBUG, "%s:%d: satisfying_pkg=%p\n", __FILE__, __LINE__, satisfying_pkg);
- if (satisfying_pkg != NULL) {
- satisfier_entry_pkg = satisfying_pkg;
- break;
- }
- }
- }
-
- /* we didn't find one, add something to the unsatisfied vector */
- if (!found) {
- if (!satisfier_entry_pkg) {
- /* failure to meet recommendations is not an error */
- if (compound_depend->type != RECOMMEND && compound_depend->type != SUGGEST)
- the_lost = add_unresolved_dep(pkg, the_lost, i);
- else
- opkg_message (conf, OPKG_NOTICE, "%s: unsatisfied recommendation for %s\n",
- pkg->name, compound_depend->possibilities[0]->pkg->name);
- }
- else {
- if (compound_depend->type == SUGGEST) {
- /* just mention it politely */
- opkg_message (conf, OPKG_NOTICE, "package %s suggests installing %s\n",
- pkg->name, satisfier_entry_pkg->name);
- } else {
- char ** newstuff = NULL;
-
- if (satisfier_entry_pkg != pkg &&
- !is_pkg_in_pkg_vec(unsatisfied, satisfier_entry_pkg)) {
- pkg_vec_insert(unsatisfied, satisfier_entry_pkg);
- pkg_hash_fetch_unsatisfied_dependencies(conf,
- satisfier_entry_pkg,
- unsatisfied,
- &newstuff);
- the_lost = merge_unresolved(the_lost, newstuff);
- }
- }
- }
- }
- }
- *unresolved = the_lost;
-
- return unsatisfied->len;
+ }
+ }
+
+ continue;
+ }
+
+ /* foreach possible satisfier, look for installed package */
+ for (j = 0; j < compound_depend->possibility_count; j++) {
+ /* foreach provided_by, which includes the abstract_pkg itself */
+ depend_t *dependence_to_satisfy =
+ possible_satisfiers[j];
+ abstract_pkg_t *satisfying_apkg =
+ possible_satisfiers[j]->pkg;
+ pkg_t *satisfying_pkg =
+ pkg_hash_fetch_best_installation_candidate
+ (satisfying_apkg,
+ pkg_installed_and_constraint_satisfied,
+ dependence_to_satisfy, 1);
+ /* Being that I can't test constraing in pkg_hash, I will test it here */
+ if (satisfying_pkg != NULL) {
+ if (!pkg_installed_and_constraint_satisfied
+ (satisfying_pkg, dependence_to_satisfy)) {
+ satisfying_pkg = NULL;
+ }
+ }
+ opkg_msg(DEBUG, "satisfying_pkg=%p\n", satisfying_pkg);
+ if (satisfying_pkg != NULL) {
+ found = 1;
+ break;
+ }
+
+ }
+ /* if nothing installed matches, then look for uninstalled satisfier */
+ if (!found) {
+ /* foreach possible satisfier, look for installed package */
+ for (j = 0; j < compound_depend->possibility_count; j++) {
+ /* foreach provided_by, which includes the abstract_pkg itself */
+ depend_t *dependence_to_satisfy =
+ possible_satisfiers[j];
+ abstract_pkg_t *satisfying_apkg =
+ possible_satisfiers[j]->pkg;
+ pkg_t *satisfying_pkg =
+ pkg_hash_fetch_best_installation_candidate
+ (satisfying_apkg,
+ pkg_constraint_satisfied,
+ dependence_to_satisfy, 1);
+ /* Being that I can't test constraing in pkg_hash, I will test it here too */
+ if (satisfying_pkg != NULL) {
+ if (!pkg_constraint_satisfied
+ (satisfying_pkg,
+ dependence_to_satisfy)) {
+ satisfying_pkg = NULL;
+ }
+ }
+
+ /* user request overrides package recommendation */
+ if (satisfying_pkg != NULL
+ && (compound_depend->type == RECOMMEND
+ || compound_depend->type == SUGGEST)
+ && (satisfying_pkg->state_want ==
+ SW_DEINSTALL
+ || satisfying_pkg->state_want ==
+ SW_PURGE)) {
+ opkg_msg(NOTICE,
+ "%s: ignoring recommendation for "
+ "%s at user request\n",
+ pkg->name,
+ satisfying_pkg->name);
+ continue;
+ }
+
+ opkg_msg(DEBUG, "satisfying_pkg=%p\n",
+ satisfying_pkg);
+ if (satisfying_pkg != NULL) {
+ satisfier_entry_pkg = satisfying_pkg;
+ break;
+ }
+ }
+ }
+
+ /* we didn't find one, add something to the unsatisfied vector */
+ if (!found) {
+ if (!satisfier_entry_pkg) {
+ /* failure to meet recommendations is not an error */
+ if (compound_depend->type != RECOMMEND
+ && compound_depend->type != SUGGEST)
+ the_lost =
+ add_unresolved_dep(pkg, the_lost,
+ i);
+ else
+ opkg_msg(NOTICE,
+ "%s: unsatisfied recommendation for %s\n",
+ pkg->name,
+ compound_depend->
+ possibilities[0]->pkg->name);
+ } else {
+ if (compound_depend->type == SUGGEST) {
+ /* just mention it politely */
+ opkg_msg(NOTICE,
+ "package %s suggests installing %s\n",
+ pkg->name,
+ satisfier_entry_pkg->name);
+ } else {
+ char **newstuff = NULL;
+
+ if (satisfier_entry_pkg != pkg &&
+ !is_pkg_in_pkg_vec(unsatisfied,
+ satisfier_entry_pkg))
+ {
+ pkg_vec_insert(unsatisfied,
+ satisfier_entry_pkg);
+ pkg_hash_fetch_unsatisfied_dependencies
+ (satisfier_entry_pkg,
+ unsatisfied, &newstuff);
+ the_lost =
+ merge_unresolved(the_lost,
+ newstuff);
+ if (newstuff)
+ free(newstuff);
+ }
+ }
+ }
+ }
+ }
+ *unresolved = the_lost;
+
+ return unsatisfied->len;