Ignore:
Timestamp:
04/25/13 07:18:40 (15 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.1-release, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
47e969a8
Parents:
83ebbb5
Message:

Fix up the conflict details, will show what packages may be broken as a result of removing a conflict

File:
1 edited

Legend:

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

    rb4350b9 rb1232b5  
    185185 
    186186QString mainWin::getConflictDetailText() { 
    187   return QString(); 
     187 
     188  QStringList ConList = ConflictList.split(" "); 
     189  QStringList tmpDeps; 
     190  QString retText; 
     191 
     192  for (int i = 0; i < ConList.size(); ++i) { 
     193    QProcess p; 
     194    tmpDeps.clear(); 
     195 
     196    if ( wDir.isEmpty() ) 
     197      p.start("pkg", QStringList() << "rquery" << "%rn-%rv" << ConList.at(i)); 
     198    else 
     199      p.start("chroot", QStringList() << wDir << "pkg" "rquery" << "%rn-%rv" << ConList.at(i) ); 
     200 
     201    if(p.waitForFinished()) { 
     202      while (p.canReadLine()) { 
     203        tmpDeps << p.readLine().simplified(); 
     204      } 
     205    } 
     206    retText+= ConList.at(i) + " " + tr("required by:") + "\n" + tmpDeps.join(" "); 
     207  } 
     208 
     209  return retText; 
    188210} 
    189211 
     
    418440    // Connect our slots 
    419441  } else { 
    420   // Running in advanced mode 
    421  
    422   } 
    423  
    424  
     442    // Running in advanced mode 
     443    populateNGPkgs(); 
     444  } 
     445} 
     446 
     447void mainWin::populateNGPkgs() 
     448{ 
     449  pushPkgApply->setEnabled(false); 
     450  treeNGPkgs->clear(); 
     451  tmpPkgList.clear(); 
     452  new QTreeWidgetItem(treeNGPkgs, QStringList() << tr("Loading... Please wait...") ); 
     453 
     454  if ( ! pkgList.isEmpty() ) 
     455        disconnect(treeNGPkgs, SIGNAL(itemChanged(QTreeWidgetItem *, int)), 0, 0); 
     456  pkgList.clear(); 
     457 
     458  // Start the process to get meta-pkg info 
     459  getNGProc = new QProcess(); 
     460  qDebug() << "Searching for pkgs..."; 
     461  connect( getNGProc, SIGNAL(readyReadStandardOutput()), this, SLOT(slotGetNGPackageDataOutput()) ); 
     462  connect( getNGProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotFinishLoadingNGPkgs()) ); 
     463  getNGProc->setProcessChannelMode(QProcess::MergedChannels); 
     464  if ( wDir.isEmpty() ) 
     465    getNGProc->start(QString("pkg"), QStringList() << "rquery" "-a" "%n:::%v:::%o:::%m:::%sb"); 
     466  else 
     467    getNGProc->start(QString("chroot"), QStringList() << wDir << "pkg" "rquery" "-a" "%n:::%v:::%o:::%m:::%sb"); 
    425468 
    426469} 
Note: See TracChangeset for help on using the changeset viewer.