File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,13 @@ QString sanitizeOutputForDisplay(const QString &output)
7070
7171QString debconfFrontend ()
7272{
73- return QFile::exists (" /usr/share/doc/debconf-kde-helper" ) ? QStringLiteral (" kde" ) : QStringLiteral (" gnome" );
73+ if (QFile::exists (" /usr/share/doc/debconf-kde-helper" )) {
74+ return QStringLiteral (" kde" );
75+ }
76+ if (QFile::exists (" /usr/share/doc/debconf-gnome" )) {
77+ return QStringLiteral (" gnome" );
78+ }
79+ return QStringLiteral (" noninteractive" );
7480}
7581
7682QHash<QString, QString> debconfEnvironment ()
@@ -3296,8 +3302,9 @@ void MainWindow::displayPackageInfo(const QModelIndex &index)
32963302
32973303 QString msg = cmd.getOut (" aptitude show " + packageName);
32983304 // Remove first 5 lines from aptitude output "Reading package..."
3299- QString details = cmd.getOut (" DEBIAN_FRONTEND=$(dpkg -l debconf-kde-helper 2>/dev/null "
3300- " | grep -sq ^i && echo kde || echo gnome) aptitude -sy -V -o=Dpkg::Use-Pty=0 install "
3305+ QString details = cmd.getOut (" DEBIAN_FRONTEND=$(dpkg -l debconf-kde-helper 2>/dev/null | grep -sq ^i && echo kde "
3306+ " || dpkg -l debconf-gnome 2>/dev/null | grep -sq ^i && echo gnome "
3307+ " || echo noninteractive) aptitude -sy -V -o=Dpkg::Use-Pty=0 install "
33013308 + packageName + " |tail -5" );
33023309
33033310 auto detail_list = details.split (' \n ' );
You can’t perform that action at this time.
0 commit comments