fix(update): keep the output of a failed self-update in the journal
A failure only opened a dialog whose text runs past the screen, and unlike the success path nothing wrote the build output anywhere, so the line that names the error was lost as soon as the box was closed.
This commit is contained in:
1 parent
3ad11318d9
commit
586e4fd0a8
6 files changed
+21
-7
No files matched your search
+16
-3
@@ -1642,12 +1642,25 @@ void MainWindow::onCoreUpdateCheckFinished(bool hasUpdate, const QString& latest
|
||||
}
|
||||
|
||||
// Called when the background git pull + build finishes. A success hands over to
|
||||
// the freshly installed binary right away; a failure is reported in a dialog.
|
||||
// the freshly installed binary right away; a failure is reported in a dialog and
|
||||
// kept whole in the journal.
|
||||
void MainWindow::onCoreSelfUpdateFinished(bool success, const QString& message) {
|
||||
if (!success) {
|
||||
// A failing build prints far more than a dialog can hold, and the part
|
||||
// that gets cut is precisely the error line. The journal keeps the whole
|
||||
// output as a command block, so the Logs screen shows it and the file can
|
||||
// be sent as it is — without it, a failed update leaves no trace at all
|
||||
// (the outcome is not a provider command, so nothing else records it).
|
||||
LogManager& journal = LogManager::instance();
|
||||
journal.beginCommand(QStringLiteral("maj-app"),
|
||||
QStringLiteral("mise à jour de l'application"));
|
||||
journal.endCommand(false, message);
|
||||
qCWarning(pacmgrUpdate) << "self-update failed, output in" << journal.filePath();
|
||||
|
||||
QMessageBox::warning(this, tr("Échec de la mise à jour"),
|
||||
QString(tr("<p>La mise à jour a échoué :</p><pre>%1</pre>"))
|
||||
.arg(message.toHtmlEscaped()));
|
||||
QString(tr("<p>La mise à jour a échoué :</p><pre>%1</pre>"
|
||||
"<p>Le journal complet est dans <code>%2</code>.</p>"))
|
||||
.arg(message.toHtmlEscaped(), journal.filePath().toHtmlEscaped()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@ installation hors Arch sans outillage ni archive ouvre la page des releases.
|
||||
| L'application redémarre sur l'ancienne version | Le `version` voisin du binaire n'a pas pu être réécrit : sans lui, `newestVersion()` retombe sur la version compilée, souvent plus ancienne. Vérifier les droits du fichier. |
|
||||
| Recompilation interminable | Méthode *Clone*/*Tarball* : c'est le comportement attendu sans archive précompilée attachée à la release. |
|
||||
| « sudo: a password is required » dans le journal | La mise à jour a tourné sans mot de passe et le dossier cible (ou l'installation des déps) le demandait : relancer et saisir le mot de passe dans le dialogue. |
|
||||
| Le dialogue d'échec est coupé et la fin du build manque | La boîte ne montre que ce qui tient sur l'écran. La sortie **complète** du script est écrite dans le journal sous le bloc `maj-app` (`⟶ échec` puis les lignes brutes) : la lire depuis l'écran **Logs**, ou ouvrir le fichier donné dans le dialogue. |
|
||||
|
||||
Voir aussi [installation.md](installation.md) pour les chemins concernés et
|
||||
[operations.md](operations.md) pour le rôle de `sudo` dans le reste de
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"<h2>PacManager v%1</h2><p>Gestionnaire de paquets pour Arch Linux (pacman).</p>": "<h2>PacManager v%1</h2><p>Paketverwaltung für Arch Linux (pacman).</p>",
|
||||
"<h3>PacManager a été mis à jour</h3><p>La nouvelle version sera active au prochain démarrage.</p><pre>%1</pre>": "<h3>PacManager wurde aktualisiert</h3><p>Die neue Version ist beim nächsten Start aktiv.</p><pre>%1</pre>",
|
||||
"<h3>PacManager v%1 est disponible</h3><p>Vous utilisez actuellement la version %2.</p>": "<h3>PacManager v%1 ist verfügbar</h3><p>Du verwendest derzeit Version %2.</p>",
|
||||
"<p>La mise à jour a échoué :</p><pre>%1</pre>": "<p>Die Aktualisierung ist fehlgeschlagen:</p><pre>%1</pre>",
|
||||
"<p>La mise à jour a échoué :</p><pre>%1</pre><p>Le journal complet est dans <code>%2</code>.</p>": "<p>Die Aktualisierung ist fehlgeschlagen:</p><pre>%1</pre><p>Das vollständige Protokoll liegt in <code>%2</code>.</p>",
|
||||
"ACTIONS RAPIDES": "SCHNELLAKTIONEN",
|
||||
"ACTIVITÉ RÉCENTE": "LETZTE AKTIVITÄT",
|
||||
"AJOUTER UN PLUGIN": "PLUGIN HINZUFÜGEN",
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"<h2>PacManager v%1</h2><p>Gestionnaire de paquets pour Arch Linux (pacman).</p>": "<h2>PacManager v%1</h2><p>Package manager for Arch Linux (pacman).</p>",
|
||||
"<h3>PacManager a été mis à jour</h3><p>La nouvelle version sera active au prochain démarrage.</p><pre>%1</pre>": "<h3>PacManager has been updated</h3><p>The new version will be active on the next start.</p><pre>%1</pre>",
|
||||
"<h3>PacManager v%1 est disponible</h3><p>Vous utilisez actuellement la version %2.</p>": "<h3>PacManager v%1 is available</h3><p>You are currently running version %2.</p>",
|
||||
"<p>La mise à jour a échoué :</p><pre>%1</pre>": "<p>The update failed:</p><pre>%1</pre>",
|
||||
"<p>La mise à jour a échoué :</p><pre>%1</pre><p>Le journal complet est dans <code>%2</code>.</p>": "<p>The update failed:</p><pre>%1</pre><p>The full log is in <code>%2</code>.</p>",
|
||||
"ACTIONS RAPIDES": "QUICK ACTIONS",
|
||||
"ACTIVITÉ RÉCENTE": "RECENT ACTIVITY",
|
||||
"AJOUTER UN PLUGIN": "ADD A PLUGIN",
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"<h2>PacManager v%1</h2><p>Gestionnaire de paquets pour Arch Linux (pacman).</p>": "<h2>PacManager v%1</h2><p>Gestor de paquetes para Arch Linux (pacman).</p>",
|
||||
"<h3>PacManager a été mis à jour</h3><p>La nouvelle version sera active au prochain démarrage.</p><pre>%1</pre>": "<h3>PacManager se ha actualizado</h3><p>La nueva versión estará activa en el próximo inicio.</p><pre>%1</pre>",
|
||||
"<h3>PacManager v%1 est disponible</h3><p>Vous utilisez actuellement la version %2.</p>": "<h3>PacManager v%1 está disponible</h3><p>Actualmente usas la versión %2.</p>",
|
||||
"<p>La mise à jour a échoué :</p><pre>%1</pre>": "<p>La actualización ha fallado:</p><pre>%1</pre>",
|
||||
"<p>La mise à jour a échoué :</p><pre>%1</pre><p>Le journal complet est dans <code>%2</code>.</p>": "<p>La actualización ha fallado:</p><pre>%1</pre><p>El registro completo está en <code>%2</code>.</p>",
|
||||
"ACTIONS RAPIDES": "ACCIONES RÁPIDAS",
|
||||
"ACTIVITÉ RÉCENTE": "ACTIVIDAD RECIENTE",
|
||||
"AJOUTER UN PLUGIN": "AÑADIR UN PLUGIN",
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"<h2>PacManager v%1</h2><p>Gestionnaire de paquets pour Arch Linux (pacman).</p>": "<h2>PacManager v%1</h2><p>Gestore di pacchetti per Arch Linux (pacman).</p>",
|
||||
"<h3>PacManager a été mis à jour</h3><p>La nouvelle version sera active au prochain démarrage.</p><pre>%1</pre>": "<h3>PacManager è stato aggiornato</h3><p>La nuova versione sarà attiva al prossimo avvio.</p><pre>%1</pre>",
|
||||
"<h3>PacManager v%1 est disponible</h3><p>Vous utilisez actuellement la version %2.</p>": "<h3>PacManager v%1 è disponibile</h3><p>Al momento usi la versione %2.</p>",
|
||||
"<p>La mise à jour a échoué :</p><pre>%1</pre>": "<p>L'aggiornamento non è riuscito:</p><pre>%1</pre>",
|
||||
"<p>La mise à jour a échoué :</p><pre>%1</pre><p>Le journal complet est dans <code>%2</code>.</p>": "<p>L'aggiornamento non è riuscito:</p><pre>%1</pre><p>Il registro completo è in <code>%2</code>.</p>",
|
||||
"ACTIONS RAPIDES": "AZIONI RAPIDE",
|
||||
"ACTIVITÉ RÉCENTE": "ATTIVITÀ RECENTE",
|
||||
"AJOUTER UN PLUGIN": "AGGIUNGI UN PLUGIN",
|
||||
|
||||
Reference in new issue
Block a user