Changeset aac79d5c


Ignore:
Timestamp:
07/15/13 14:50:42 (14 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
1f14f705
Parents:
d483bc2
Message:

Greatly speed up the pkg-pkgmanager at startup, don't need to build a
full reverse dependancy list, we can generate it on the fly when
removing packages.

File:
1 edited

Legend:

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

    r2c1e079 raac79d5c  
    526526  } 
    527527 
    528   qDebug() << "Building reverse dependancy lists..."; 
    529   pkgRDepList.clear(); 
    530   if ( wDir.isEmpty() ) 
    531     p.start("pkg", QStringList() << "rquery" << "-a" << "%n-%v:::%rn-%rv"); 
    532   else 
    533     p.start("chroot", QStringList() << wDir << "pkg" << "rquery" << "-a" << "%n-%v:::%rn-%rv" ); 
    534   while(p.state() == QProcess::Starting || p.state() == QProcess::Running) { 
    535       p.waitForFinished(200); 
    536       QCoreApplication::processEvents(); 
    537   } 
    538   while (p.canReadLine()) { 
    539     pkgRDepList << p.readLine().simplified(); 
    540   } 
    541  
    542528  getNGProc = new QProcess(); 
    543529  qDebug() << "Searching for installed pkgs..."; 
     
    743729      confirmText+= "------------------------------------------\n"; 
    744730      for ( int i=0; i < rmPkgs.size(); ++i) { 
     731         
     732         // Get rdeps for this pkg 
     733         qDebug() << "Building reverse dependancy lists..."; 
     734         pkgRDepList.clear(); 
     735         QProcess p; 
     736         if ( wDir.isEmpty() ) 
     737           p.start("pkg", QStringList() << "rquery" << "%n-%v:::%rn-%rv" << rmPkgs.at(i)); 
     738         else 
     739           p.start("chroot", QStringList() << wDir << "pkg" << "rquery" << "%n-%v:::%rn-%rv" << rmPkgs.at(i) ); 
     740         while(p.state() == QProcess::Starting || p.state() == QProcess::Running) { 
     741           p.waitForFinished(200); 
     742           QCoreApplication::processEvents(); 
     743         } 
     744         while (p.canReadLine()) { 
     745           pkgRDepList << p.readLine().simplified(); 
     746         } 
     747 
    745748         QRegExp rx(rmPkgs.at(i) + ":::*"); 
    746749         rx.setPatternSyntax(QRegExp::Wildcard); 
Note: See TracChangeset for help on using the changeset viewer.