Changeset 8c6e16d


Ignore:
Timestamp:
12/12/13 09:44:16 (9 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
cbead0d1, f90fe71, 625bd48
Parents:
f520161
Message:

Disable the use of pkgng's EVENT_PIPE for our package GUI, using it causes
pkgng to segfault everytime we try to install packages :(

Once they fix this upstream we can re-enable and test it further

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-pkgmanager/mainWin.cpp

    rfa2ad6e r8c6e16d  
    373373  QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); 
    374374  env.insert("PCFETCHGUI", "YES"); 
    375   env.insert("EVENT_PIPE", "/tmp/pkg-fifo"); 
     375 
     376  // KPM 12-12-2013 
     377  // EVENT_PIPE causes segfaults in pkgng 1.2.3 :( 
     378  // Re-enable this when its fixed upstream 
     379  //env.insert("EVENT_PIPE", "/tmp/pkg-fifo"); 
     380 
    376381  uProc->setProcessEnvironment(env); 
    377382  uProc->setProcessChannelMode(QProcess::MergedChannels); 
     
    14991504void mainWin::slotReadEventPipe() 
    15001505{ 
    1501    QString line; 
     1506   QString line, tmp, file, dl, tot; 
    15021507 
    15031508   while (eP->canReadLine()) { 
     
    15051510     qDebug() << line; 
    15061511 
    1507      // No JSON in Qt4, once we move to Qt5, replace this 
     1512     // KPM!! 
     1513     // TODO 12-12-2013 
     1514     // No JSON in Qt4, once we move to Qt5, replace this hack 
    15081515     // with the new JSON parser 
     1516 
     1517     // Look for any "msg" lines 
    15091518     if ( line.indexOf("\"msg") != -1 ) { 
    15101519          line.remove(0, line.indexOf("\"msg") + 8); 
     
    15121521          qDebug() << line; 
    15131522          textStatus->setText(line); 
     1523          continue; 
    15141524     } 
    1515    } 
    1516 } 
     1525 
     1526     // Look for a download status update 
     1527     if ( line.indexOf("\"INFO_FETCH") != -1 && line.indexOf("\"url\"") != -1 ) { 
     1528          line.remove(0, line.indexOf("\"url") + 8); 
     1529          line.truncate(line.lastIndexOf("}")); 
     1530 
     1531          // Get the file basename 
     1532          file = line; 
     1533          file.truncate(line.indexOf("\"")); 
     1534          QFileInfo tFile; 
     1535          tFile.setFile(file); 
     1536          file = tFile.baseName(); 
     1537 
     1538          // Get the download / total 
     1539          dl = line.section(":", 2, 2).section(",", 0, 0); 
     1540          tot = line.section(":", 3, 3).section("}", 0, 0); 
     1541 
     1542          // Set the status update 
     1543          textStatus->setText(tr("Downloading") + " " + file + " (" + dl + "/" + tot + ")" ); 
     1544     } 
     1545 
     1546   } // End of while canReadLine() 
     1547} 
Note: See TracChangeset for help on using the changeset viewer.