void log_action(const char *action, struct pkginfo *pkg) { const char *pkgname = pkg_describe(pkg, pdo_foreign); log_message("%s %s %s %s", action, pkgname, versiondescribe(&pkg->installed.version, vdew_nonambig), versiondescribe(&pkg->available.version, vdew_nonambig)); statusfd_send("processing: %s: %s", action, pkgname); }
void log_action(const char *action, struct pkginfo *pkg, struct pkgbin *pkgbin) { log_message("%s %s %s %s", action, pkgbin_name(pkg, pkgbin, pnaw_always), versiondescribe(&pkg->installed.version, vdew_nonambig), versiondescribe(&pkg->available.version, vdew_nonambig)); statusfd_send("processing: %s: %s", action, pkgbin_name(pkg, pkgbin, pnaw_nonambig)); }
void print_error_perarchive(const char *emsg, const void *data) { const char *filename = data; notice(_("error processing archive %s (--%s):\n %s"), filename, cipaction->olong, emsg); statusfd_send("status: %s : %s : %s", filename, "error", emsg); enqueue_error_report(filename); }
void print_error_perpackage(const char *emsg, const void *data) { const char *pkgname = data; notice(_("error processing package %s (--%s):\n %s"), pkgname, cipaction->olong, emsg); statusfd_send("status: %s : %s : %s", pkgname, "error", emsg); enqueue_error_report(pkgname); }
/* Note: If anyone wants to set some triggers-pending, they must also * set status appropriately, or we will undo it. That is, it is legal * to call this when pkg->status and pkg->trigpend_head disagree and * in that case pkg->status takes precedence and pkg->trigpend_head * will be adjusted. */ void modstatdb_note(struct pkginfo *pkg) { struct trigaw *ta; onerr_abort++; /* Clear pending triggers here so that only code that sets the status * to interesting (for triggers) values has to care about triggers. */ if (pkg->status != stat_triggerspending && pkg->status != stat_triggersawaited) pkg->trigpend_head = NULL; if (pkg->status <= stat_configfiles) { for (ta = pkg->trigaw.head; ta; ta = ta->sameaw.next) ta->aw = NULL; pkg->trigaw.head = pkg->trigaw.tail = NULL; } log_message("status %s %s %s", statusinfos[pkg->status].name, pkg->name, versiondescribe(&pkg->installed.version, vdew_nonambig)); statusfd_send("status: %s: %s", pkg->name, statusinfos[pkg->status].name); if (cstatus >= msdbrw_write) modstatdb_note_core(pkg); if (!pkg->trigpend_head && pkg->othertrigaw_head) { /* Automatically remove us from other packages' Triggers-Awaited. * We do this last because we want to maximise our chances of * successfully recording the status of the package we were * pointed at by our caller, although there is some risk of * leaving us in a slightly odd situation which is cleared up * by the trigger handling logic in deppossi_ok_found. */ trig_clear_awaiters(pkg); } onerr_abort--; }
void print_error_perpackage(const char *emsg, const char *arg) { struct error_report *nr; fprintf(stderr, _("%s: error processing %s (--%s):\n %s\n"), DPKG, arg, cipaction->olong, emsg); statusfd_send("status: %s : %s : %s", arg, "error", emsg); nr= malloc(sizeof(struct error_report)); if (!nr) { perror(_("dpkg: failed to allocate memory for new entry in list of failed packages.")); abort_processing = 1; nr= &emergency; } nr->what= arg; nr->next = NULL; *lastreport= nr; lastreport= &nr->next; if (nerrs++ < errabort) return; fprintf(stderr, _("dpkg: too many errors, stopping\n")); abort_processing = 1; }
void print_error_perpackage(const char *emsg, const char *arg) { struct error_report *nr; notice(_("error processing %s (--%s):\n %s"), arg, cipaction->olong, emsg); statusfd_send("status: %s : %s : %s", arg, "error", emsg); nr= malloc(sizeof(struct error_report)); if (!nr) { notice(_("failed to allocate memory for new entry in list of failed packages: %s"), strerror(errno)); abort_processing = true; nr= &emergency; } nr->what= arg; nr->next = NULL; *lastreport= nr; lastreport= &nr->next; if (nerrs++ < errabort) return; notice(_("too many errors, stopping")); abort_processing = true; }