[PC-BSD Commits] r17461 - pcbsd/current/src-qt4/EasyPBI

svn at pcbsd.org svn at pcbsd.org
Tue Jun 26 12:37:33 PDT 2012


Author: kenmoore
Date: 2012-06-26 19:37:31 +0000 (Tue, 26 Jun 2012)
New Revision: 17461

Modified:
   pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp
Log:
Cleanup how EasyPBI starts up the PBI build process a bit, and fix a minor bug during the first-run.



Modified: pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp
===================================================================
--- pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp	2012-06-26 18:28:37 UTC (rev 17460)
+++ pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp	2012-06-26 19:37:31 UTC (rev 17461)
@@ -91,7 +91,7 @@
     }
   }  
   //Check for the ports Directory and Set the internal variable 'PORTS_DIR'
-  if(!Check_For_Ports(true)){ return; }
+  Check_For_Ports(true);
 
   //Check for the defaulticons.png file
   if( !QFile(DEFAULTICON_FILE).exists() ){
@@ -437,6 +437,16 @@
     return;
   }
   
+  //Setup the pbi_makeport command from GUI settings
+  QString cmd = "pbi_makeport";
+  cmd += " -c " + modDir;
+  if(PORTS_DIR != "/usr/ports"){ cmd += " -d " + PORTS_DIR; }
+  cmd += " -o " + outdir;
+  cmd += " --delbuild";
+  if( ui->checkTMPFS->isChecked() ){ cmd += " --tmpfs"; }
+  if(!sigfile.isEmpty()){ cmd += " --sign " + sigfile; }
+  qDebug() << "Build PBI command created:"<<cmd;
+
   //Receive User verification before beginning build process due to:
   //  -- long time required, internet connection required, root permissions required
   QMessageBox verify;
@@ -446,18 +456,12 @@
   verify.setDefaultButton(QMessageBox::Yes);
   int ret = verify.exec();
   if(ret != QMessageBox::Yes){return;}
+
+  //Add the necessary glue to the command to run the pbi build
+  cmd.prepend("gksu -a \"unset LD_LIBRARY_PATH; ");
+  cmd.append("\"");
+  qDebug() << "Actual command used:" << cmd;
   
-  //Setup the pbi_makeport command from GUI settings
-  QString cmd = "gksu -a \"pbi_makeport";
-  cmd += " -c " + modDir;
-  if(PORTS_DIR != "/usr/ports"){ cmd += " -d " + PORTS_DIR; }
-  cmd += " -o " + outdir;
-  cmd += " --delbuild";
-  if( ui->checkTMPFS->isChecked() ){ cmd += " --tmpfs"; }
-  if(!sigfile.isEmpty()){ cmd += " --sign " + sigfile; }
-  cmd += "\"";
-  qDebug() << "Build PBI command created:"<<cmd;
-  
   //Setup the displays
   ui->pushKillBuild->setEnabled(TRUE);
   ui->pushSaveLog->setEnabled(FALSE);
@@ -467,11 +471,6 @@
   //Setup Process connections
   p = new QProcess(this);
   p->setProcessChannelMode(QProcess::MergedChannels);
-  //Remove the LD_LIBRARY_PATH environment variable (use system environment) for this process
-  QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
-  env.remove("LD_LIBRARY_PATH");
-  //env.insert ("LD_LIBRARY_PATH",""); //alternate method
-  p->setProcessEnvironment(env);
   connect(p,SIGNAL(readyReadStandardOutput()),this,SLOT(updatePBIBuild()) );
   connect(ui->pushKillBuild,SIGNAL(clicked()),this,SLOT(killPBIBuild()) );
   connect(p,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(PBIbuildFinished(int,QProcess::ExitStatus)) );



More information about the Commits mailing list