SVN: PLDLiveInstaller/branches/0.2: PLDLiveInstaller.cpp PLDLiveInstaller.h Version.h

shadzik shadzik at pld-linux.org
Mon Dec 6 11:36:06 CET 2010


Author: shadzik
Date: Mon Dec  6 11:36:05 2010
New Revision: 11956

Modified:
   PLDLiveInstaller/branches/0.2/PLDLiveInstaller.cpp
   PLDLiveInstaller/branches/0.2/PLDLiveInstaller.h
   PLDLiveInstaller/branches/0.2/Version.h
Log:
- merged with trunk


Modified: PLDLiveInstaller/branches/0.2/PLDLiveInstaller.cpp
==============================================================================
--- PLDLiveInstaller/branches/0.2/PLDLiveInstaller.cpp	(original)
+++ PLDLiveInstaller/branches/0.2/PLDLiveInstaller.cpp	Mon Dec  6 11:36:05 2010
@@ -916,7 +916,7 @@
     installationText->setFixedHeight(60);
     
     pbar = new QProgressBar(this);
-    pbar->setRange(0,3);
+    pbar->setRange(0,4);
     pbar->setFormat("%v out of %m (%p%)");
     pbar->setFixedWidth(700);
     pbar->setFixedHeight(40);
@@ -1294,6 +1294,27 @@
   return userdel->exitCode()==0;
 }
 
+void PLDLiveInstaller::removeJunk(QString filedir, QString argstorm)
+{
+  QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
+  installationText->setText("<html><p align=\"left\">"
+    "Cleaning up..."
+    "</p></html>"
+  );
+  qDebug() << "Deleting junk: " << filedir;
+  QStringList args;
+  args.append(DESTINATION);
+  args.append("rm");
+  if (!argstorm.isEmpty())
+    args.append(argstorm);
+  args.append(filedir);
+  QProcess * remjunk = new QProcess(this);
+  remjunk->start("chroot", args);
+  remjunk->waitForFinished(-1);
+  updateProgressBar();
+  remjunk->deleteLater();
+}
+
 char * PLDLiveInstaller::genPasswd()
 {
   QApplication::processEvents(QEventLoop::ExcludeUserInputEvents, -1);
@@ -1631,6 +1652,10 @@
       KAssistantDialog::next();
       KAssistantDialog::showButtonSeparator(false);
     }
+    
+    if(cont) {
+     removeJunk("/var/tmp/kdecache-plduser","-rf"); 
+    }
 
     if(cont && !mountProcSysDev()) {
       cont = false;

Modified: PLDLiveInstaller/branches/0.2/PLDLiveInstaller.h
==============================================================================
--- PLDLiveInstaller/branches/0.2/PLDLiveInstaller.h	(original)
+++ PLDLiveInstaller/branches/0.2/PLDLiveInstaller.h	Mon Dec  6 11:36:05 2010
@@ -67,6 +67,7 @@
     bool createHostname(), createFstabEntries(), createUser(), copySettings(QString file), deleteLiveUser();
     int getMemoryAmount();
     int effectivePasswordLength(const QString& password);
+    void removeJunk(QString filedir, QString argstorm);
     
 public:
     PLDLiveInstaller( QWidget * parent = 0 );

Modified: PLDLiveInstaller/branches/0.2/Version.h
==============================================================================
--- PLDLiveInstaller/branches/0.2/Version.h	(original)
+++ PLDLiveInstaller/branches/0.2/Version.h	Mon Dec  6 11:36:05 2010
@@ -1,3 +1,3 @@
-#define	VERSION "0.2"
+#define	VERSION "0.22"
 #define VERSION_STR "Version " VERSION
 #define KDEVER "4.5"


More information about the pld-cvs-commit mailing list