[PC-BSD Commits] r6178 - pcbsd/trunk/SystemUpdaterTray

svn at pcbsd.org svn at pcbsd.org
Thu Feb 4 08:35:24 PST 2010


Author: kris
Date: 2010-02-04 08:35:24 -0800 (Thu, 04 Feb 2010)
New Revision: 6178

Modified:
   pcbsd/trunk/SystemUpdaterTray/UpdaterTray.cpp
Log:

Fixed bug in updater tray, wasn't checking for PBI updates properly



Modified: pcbsd/trunk/SystemUpdaterTray/UpdaterTray.cpp
===================================================================
--- pcbsd/trunk/SystemUpdaterTray/UpdaterTray.cpp	2010-02-04 16:19:06 UTC (rev 6177)
+++ pcbsd/trunk/SystemUpdaterTray/UpdaterTray.cpp	2010-02-04 16:35:24 UTC (rev 6178)
@@ -10,6 +10,7 @@
 #include <qtextstream.h>
 #include <QFile>
 #include <QProcess>
+#include <QDebug>
 #include <qmenu.h>
 
 /* KDE */
@@ -125,7 +126,7 @@
   // Start the monitor service for system updates
   QTimer::singleShot(1000, this, SLOT(slotScheduledSystemCheck()));
   // Start the monitor service for PBI updates
-  QTimer::singleShot(1000, this, SLOT(slotScheduledPBICheck()));
+  QTimer::singleShot(2000, this, SLOT(slotScheduledPBICheck()));
 
    // KPM 8-25-09 Disable PBI watcher for now, too many needless hits to update server for checking
    // Watch our trigger file to see if the list of installed PBIs changes
@@ -628,15 +629,17 @@
 void UpdaterTray::slotStartPBIUpdateCheck()
 {
 
-    if ( pbistatus == PBI_CHECKING4UPDATES || pbistatus == PBI_UPDATING )
-    {
-	return;
-    }
+  if ( pbistatus == PBI_CHECKING4UPDATES || pbistatus == PBI_UPDATING )
+  {
+     return;
+  }
 
-int i = -1;
-QString tmp, ProgDirName;
+  //qDebug() << "Starting PBI update check...";
 
+  int i = -1;
+  QString tmp, ProgDirName;
 
+
  // Load all the PBIs from our list and only keep the ones with update URLs. 
  QFile file( "/Programs/.config/ProgList" );
     if ( file.open( QIODevice::ReadOnly ) ) {
@@ -740,6 +743,8 @@
     }
 
 
+  // qDebug() << "Checking PBI: " << PBIProgName[currentWorkingPBI];
+
   tmp = PBIProgName[currentWorkingPBI];
   tmp.replace(" ", "");
   progName = tmp;
@@ -747,7 +752,7 @@
 
 
   // First, get some variables to figure out the full patch URL
-  QFile file( "/Programs/" + progName + PBIProgVer[currentWorkingPBI] + "/PBI.UpdateURL.sh" );
+  QFile file( "/Programs/" + progName + "/PBI.UpdateURL.sh" );
   if ( file.open( QIODevice::ReadOnly ) ) {
       QTextStream stream( &file );
       while ( !stream.atEnd() ) {



More information about the Commits mailing list