Ignore:
Timestamp:
06/25/13 12:21:37 (14 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
6e0ee8d
Parents:
e51ae51
Message:

Avoid pkgng locking issues, by only looking for updates once the initial
package reading is finished. Otherwise you end up with cases where some
of the commands will fail, due to the sqlite DB being locked

File:
1 edited

Legend:

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

    ra30e795 r584b6ff  
    4848  treeMetaPkgs->setContextMenuPolicy(Qt::CustomContextMenu); 
    4949  connect(treeMetaPkgs, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(slotMetaRightClick()) ); 
    50  
    51   QTimer::singleShot(200, this, SLOT(slotRescanPkgsClicked() ) ); 
    5250 
    5351  QSettings settings("PC-BSD", "PackageManager"); 
     
    430428  stackedTop->setCurrentIndex(0); 
    431429  
    432   // Re-scan for updates 
    433   slotRescanPkgsClicked(); 
    434  
    435430  // Re-init the meta-widget 
    436431  initMetaWidget(); 
     
    550545  connect(treeNGPkgs, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotEnableApply())); 
    551546  connect(treeNGPkgs, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(slotNGItemChanged())); 
     547 
     548  // Now we can look for updates safely 
     549  slotRescanPkgsClicked(); 
    552550} 
    553551 
     
    637635   tmpPkgList.sort(); 
    638636 
    639    QTreeWidgetItem *catItem; 
     637   QTreeWidgetItem *catItem = new QTreeWidgetItem; 
    640638 
    641639   // Lets start adding packages to the tree widget 
     
    838836 
    839837  connect(treeMetaPkgs, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotDeskPkgsChanged(QTreeWidgetItem *, int))); 
     838 
     839  // Now we can look for updates safely 
     840  slotRescanPkgsClicked(); 
    840841} 
    841842 
Note: See TracChangeset for help on using the changeset viewer.