[PC-BSD Commits] r7714 - pcbsd/current/src-qt4/pc-sysinstaller

svn at pcbsd.org svn at pcbsd.org
Tue Oct 5 10:32:57 PDT 2010


Author: kris
Date: 2010-10-05 10:32:57 -0700 (Tue, 05 Oct 2010)
New Revision: 7714

Modified:
   pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp
   pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h
Log:

Added some logic to installer gui, for dealing with meta-pkgs when we may be booting
from a media, such as CD, or live disk only which doesn't include the packages on disk. 

In this case, we will not give option to install meta-pkgs, unless doing a network install,
in which case the packages are still available. If not, then the user can add them post-install
via the System tool. 



Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp	2010-10-05 17:14:08 UTC (rev 7713)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp	2010-10-05 17:32:57 UTC (rev 7714)
@@ -101,6 +101,19 @@
     if (availPackageData)
 	initDesktopPkgs();
 
+    // Do check for available meta-pkgs on boot media
+    if ( QFile::exists("/usr/no-meta-pkgs") )
+    	hasPkgsOnMedia = false;
+    else
+    	hasPkgsOnMedia = true;
+
+    // Do check for install pkgs on boot media
+    if ( QFile::exists("/usr/no-install-pkgs") )
+    	hasInstallOnMedia = false;
+    else
+    	hasInstallOnMedia = true;
+
+    // Is this a LIVE disk?
     if ( QFile::exists("/usr/pcbsd-live") )
     	isLiveMode = true;
     else
@@ -312,7 +325,8 @@
       return;
 
    // If this install medium doesn't contain package information
-   if ( stackWidget->currentIndex() == 4 && ! availPackageData ) {
+   if ( (stackWidget->currentIndex() == 4 && ! availPackageData ) || \
+        (stackWidget->currentIndex() == 4 && ! hasPkgsOnMedia && ! radioNetworkInstall->isChecked() ) ) {
        QString ss = labels.at(4)->styleSheet();
        labels.at(4)->setStyleSheet("color: rgb(255, 255, 255);");
        labels.at(6)->setStyleSheet(ss);
@@ -392,7 +406,8 @@
 
    // If this install medium doesn't contain package information
 
-   if ( stackWidget->currentIndex() == 6 && ! availPackageData ) {
+   if ( (stackWidget->currentIndex() == 6 && ! availPackageData ) || \
+        (stackWidget->currentIndex() == 6 && ! hasPkgsOnMedia && ! radioNetworkInstall->isChecked() ) ) {
        QString ss = labels.at(6)->styleSheet();
        labels.at(6)->setStyleSheet("color: rgb(255, 255, 255);");
        labels.at(4)->setStyleSheet(ss);
@@ -738,7 +753,7 @@
     cfgList+=getUsersCfgSettings(summaryList);
 
   // If doing install from package disk
-  if ( availPackageData )
+  if ( (availPackageData && hasPkgsOnMedia ) || ( availPackageData && radioNetworkInstall->isChecked() ) )
     cfgList+=getDeskPkgCfg(summaryList);
 
   // If this is a PC-BSD Install, do a few extra commands after everything else

Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h	2010-10-05 17:14:08 UTC (rev 7713)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h	2010-10-05 17:32:57 UTC (rev 7714)
@@ -193,6 +193,8 @@
     QString fetchDownloadFile;
     bool availPackageData;
     bool isLiveMode;
+    bool hasPkgsOnMedia;
+    bool hasInstallOnMedia;
     QList<QStringList> listDeskPkgs; // QStringList for our available desktop pkgs
 
 };



More information about the Commits mailing list