[PC-BSD Commits] r20598 - pcbsd/current/src-qt4/pc-installgui
svn at pcbsd.org
svn at pcbsd.org
Mon Dec 17 09:21:05 PST 2012
Author: kris
Date: 2012-12-17 17:21:05 +0000 (Mon, 17 Dec 2012)
New Revision: 20598
Modified:
pcbsd/current/src-qt4/pc-installgui/installer.cpp
Log:
Use new pc-sysinstall installPackages= config to install PC-BSD/TrueOS
Modified: pcbsd/current/src-qt4/pc-installgui/installer.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/installer.cpp 2012-12-17 16:30:28 UTC (rev 20597)
+++ pcbsd/current/src-qt4/pc-installgui/installer.cpp 2012-12-17 17:21:05 UTC (rev 20598)
@@ -986,6 +986,14 @@
// Save the install config script to disk
cfgList << "runExtCommand=/root/save-config.sh";
+ cfgList+= "";
+
+ // If doing install from package disk
+ if ( hasPkgsOnMedia )
+ cfgList+=getDeskPkgCfg();
+
+ cfgList+= "";
+
// If this is a PC-BSD Install, do a few extra commands after everything else
if ( wheelCurItem != wFREEBSD && wheelCurItem != wPCSERVER && wheelCurItem != 12 ) {
@@ -1017,9 +1025,6 @@
//layout.truncate(layout.size() -1 );
//cfgList << "runCommand=/usr/local/share/pcbsd/scripts/set-lang.sh " + lang + " " + layout;
- // If doing install from package disk
- if ( hasPkgsOnMedia )
- cfgList+=getDeskPkgCfg();
// Set all firewall rules
cfgList << "runCommand=sh /usr/local/share/pcbsd/scripts/sys-init.sh";
@@ -1042,10 +1047,6 @@
if ( fSSH )
cfgList << "runCommand=echo 'sshd_enable=\"YES\"' >>/etc/rc.conf";
- // If doing install from package disk
- if ( hasPkgsOnMedia )
- cfgList+=getDeskPkgCfg();
-
// Unmount our /dev
cfgList << "runExtCommand=umount ${FSMNT}/dev";
}
@@ -1536,21 +1537,44 @@
if ( wheelCurItem == wFREEBSD )
return QStringList();
- QStringList cfgList;
- QString cfgLine;
- cfgLine="runExtCommand=sh /root/insMetaPkgs.sh base-system";
+ QStringList cfgList, pkgList;
+ QString line;
- for ( int i=0; i<selectedPkgs.count(); ++i)
- cfgLine+="," + selectedPkgs.at(i);
+ QList<QStringList> curList;
- cfgLine += " CD";
-
- if ( wheelCurItem != wPCSERVER && wheelCurItem != 12 )
- cfgLine += " pcbsd";
+ if ( wheelCurItem != wPCSERVER && wheelCurItem != 11 && wheelCurItem != 12)
+ curList = listDeskPkgs;
else
- cfgLine += " warden";
+ curList = listServerPkgs;
- cfgList << cfgLine;
+ // Loop though list of pkgs, see what to install
+ for ( int d=0; d < curList.count(); ++d) {
+ for ( int i=0; i < selectedPkgs.count(); ++i)
+ // Is the package selected or the base-system?
+ if ( curList.at(d).at(0) == selectedPkgs.at(i) || curList.at(d).at(0) == "base-system" ) {
+
+ // Yay! Lets get a list of packages to install
+ QFile mFile;
+ mFile.setFileName(curList.at(d).at(6));
+ if ( ! mFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ qDebug() << "Invalid meta-pkg list:" << curList.at(d).at(6);
+ break;
+ }
+
+ // Read in the meta pkg list
+ QTextStream in(&mFile);
+ while ( !in.atEnd() ) {
+ line = in.readLine();
+ if ( line.isEmpty() )
+ continue;
+ pkgList << line.simplified();
+ }
+ mFile.close();
+ break;
+ }
+ }
+
+ cfgList << "installPackages=" + pkgList.join(",");
return cfgList;
}
More information about the Commits
mailing list