ALT Linux Bugzilla
– Attachment 7285 Details for
Bug 28507
Всегда возвращает положительный результат
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Check extiCode patch
0001-Check-exit-code-of-an-apt-get-cmd.patch (text/plain), 2.25 KB, created by
Константин Артюшкин
on 2017-11-20 12:33:54 MSK
(
hide
)
Description:
Check extiCode patch
Filename:
MIME Type:
Creator:
Константин Артюшкин
Created:
2017-11-20 12:33:54 MSK
Size:
2.25 KB
patch
obsolete
>From be4b416e1c9e6cdcef739134ac64032055d2ee7e Mon Sep 17 00:00:00 2001 >From: Konstantin Artyushkin <akv@altlinux.org> >Date: Mon, 20 Nov 2017 11:37:13 +0300 >Subject: [PATCH] Check exit code of an apt-get cmd > >--- > packageinstall/dialog.cpp | 15 ++++++++++----- > packageinstall/dialog.h | 2 +- > 2 files changed, 11 insertions(+), 6 deletions(-) > >diff --git a/packageinstall/dialog.cpp b/packageinstall/dialog.cpp >index 8e83583..98cca93 100644 >--- a/packageinstall/dialog.cpp >+++ b/packageinstall/dialog.cpp >@@ -59,7 +59,7 @@ Dialog::Dialog( QStringList *p, QWidget *parent, Qt::WFlags flags ) > env.replaceInStrings( QRegExp("^LC_ALL=(.*)", Qt::CaseInsensitive), "LC_ALL=C" ); > process->setEnvironment( env ); > >- connect( process, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(processStop()) ); >+ connect( process, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(processStop(int, QProcess::ExitStatus)) ); > connect( process, SIGNAL(readyReadStandardOutput()), this, SLOT(readOutput()) ); > connect( process, SIGNAL(readyReadStandardError()), this, SLOT(readError()) ); > //connect( dlg, SIGNAL(rejected()), this, SLOT(cancelPressed()) ); >@@ -148,13 +148,18 @@ void Dialog::processStart() { > > > // On finish process >-void Dialog::processStop() { >+void Dialog::processStop(int exitCode, QProcess::ExitStatus) { > //qDebug( "processStop" ); > > if( d ) { >- setStatus( tr("Installation is finished successful"), 100, QString( "" ) ); >- d->bInstall->hide(); >- d->bCancel->setText( tr("&Exit") ); >+ if ( exitCode != 0 ){ >+ setStatus( tr("ERROR: Something went wrong. Please click on the \"Show details\"!"), 0,""); >+ } >+ else { >+ setStatus( tr("Installation is finished successful"), 100, QString( "" ) ); >+ } >+ d->bInstall->hide(); >+ d->bCancel->setText( tr("&Exit") ); > state = 5; > } > } >diff --git a/packageinstall/dialog.h b/packageinstall/dialog.h >index a318d6c..177b4e1 100644 >--- a/packageinstall/dialog.h >+++ b/packageinstall/dialog.h >@@ -64,7 +64,7 @@ private slots: > void readOutput(); > void readError(); > void windowClose(); >- void processStop(); >+ void processStop(int, QProcess::ExitStatus); > > // Button actions > void detailPressed(); >-- >2.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28507
:
5729
|
5730
|
7283
|
7284
| 7285