[PC-BSD Commits] r21389 - in pcbsd/current/src-qt4: about-gui pc-softwaremanager pc-sysmanager pc-sysmanager/scripts

svn at pcbsd.org svn at pcbsd.org
Thu Feb 7 10:44:04 PST 2013


Author: kris
Date: 2013-02-07 18:44:03 +0000 (Thu, 07 Feb 2013)
New Revision: 21389

Modified:
   pcbsd/current/src-qt4/about-gui/mainwindow.cpp
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
   pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp
   pcbsd/current/src-qt4/pc-sysmanager/scripts/GenDiagSheet.sh
Log:

Fix up a number of utils to display correct system version now



Modified: pcbsd/current/src-qt4/about-gui/mainwindow.cpp
===================================================================
--- pcbsd/current/src-qt4/about-gui/mainwindow.cpp	2013-02-07 18:35:16 UTC (rev 21388)
+++ pcbsd/current/src-qt4/about-gui/mainwindow.cpp	2013-02-07 18:44:03 UTC (rev 21389)
@@ -77,7 +77,7 @@
     }
 
     // pcbsd version
-    Ver = Utils::runShellCommand("pbreg get /PC-BSD/Version").at(0);
+    Ver = Utils::runShellCommand("uname -r").at(0);
     ui->VersionLabel->setText(Ver+" ("+Arch+")");
     ui->UnstableLabel->setVisible(false);
     Ver = Ver.trimmed();

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2013-02-07 18:35:16 UTC (rev 21388)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.cpp	2013-02-07 18:44:03 UTC (rev 21389)
@@ -733,7 +733,7 @@
   QSettings settings("PCBSD");
 
   // Get the PC-BSD Version
-  Version = getLineFromCommandOutput("pbreg get /PC-BSD/Version");
+  Version = getLineFromCommandOutput("uname -r");
 
   // Get the system type
   QString command = "uname -m";

Modified: pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp	2013-02-07 18:35:16 UTC (rev 21388)
+++ pcbsd/current/src-qt4/pc-sysmanager/pbsystemtab.cpp	2013-02-07 18:44:03 UTC (rev 21389)
@@ -141,10 +141,23 @@
 
 void PBSystemTab::CheckPBVer()
 {
- QSettings settings("PCBSD");
- Version = getLineFromCommandOutput("pbreg get /PC-BSD/Version");
- labelPCBSD->setText(Version);
+ 
+ QString pcVer="";
+ QStringList out = Utils::runShellCommand(QString("pkg info -f pcbsd-base"));
+ if (out.size()) {
+   for (int i=0; i<out.size(); i++)
+   {
+     if (out[i].contains("Version"))
+     {
+         pcVer = out[i];
+         pcVer.replace("Version        : ","");
+         labelPCBSD->setText(pcVer);
+         break;
+     }
+   }
+ }
 
+
  Arch = getLineFromCommandOutput("uname -m");
  
 }

Modified: pcbsd/current/src-qt4/pc-sysmanager/scripts/GenDiagSheet.sh
===================================================================
--- pcbsd/current/src-qt4/pc-sysmanager/scripts/GenDiagSheet.sh	2013-02-07 18:35:16 UTC (rev 21388)
+++ pcbsd/current/src-qt4/pc-sysmanager/scripts/GenDiagSheet.sh	2013-02-07 18:44:03 UTC (rev 21389)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-PCVER="`pbreg get /PC-BSD/Version`"
+PCVER="`uname -r`"
 DATE="`date`"
 
 echo "PC-BSD $PCVER Diagnostic Sheet



More information about the Commits mailing list