- if (install.size() > 0)
- fprintf(history_out, "Install: %s\n", install.c_str());
- if (upgrade.size() > 0)
- fprintf(history_out, "Upgrade: %s\n", upgrade.c_str());
- if (downgrade.size() > 0)
- fprintf(history_out, "Downgrade: %s\n", downgrade.c_str());
- if (remove.size() > 0)
- fprintf(history_out, "Remove: %s\n", remove.c_str());
- if (purge.size() > 0)
- fprintf(history_out, "Purge: %s\n", purge.c_str());
+ if (_config->Exists("Commandline::AsString") == true)
+ WriteHistoryTag("Commandline", _config->Find("Commandline::AsString"));
+ WriteHistoryTag("Install", install);
+ WriteHistoryTag("Upgrade", upgrade);
+ WriteHistoryTag("Downgrade",downgrade);
+ WriteHistoryTag("Remove",remove);
+ WriteHistoryTag("Purge",purge);
+ fflush(history_out);