SVN: PLDLiveInstaller/trunk: PLDLiveInstaller.cpp PLDLiveInstaller.h Version.h

shadzik shadzik at pld-linux.org
Mon Dec 6 11:34:58 CET 2010


Author: shadzik
Date: Mon Dec  6 11:34:58 2010
New Revision: 11955

Modified:
   PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
   PLDLiveInstaller/trunk/PLDLiveInstaller.h
   PLDLiveInstaller/trunk/Version.h
Log:
- delete /var/tmp/kdecache-plduser form destination
- mark as ver 0.22


Modified: PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
==============================================================================
--- PLDLiveInstaller/trunk/PLDLiveInstaller.cpp	(original)
+++ PLDLiveInstaller/trunk/PLDLiveInstaller.cpp	Mon Dec  6 11:34:58 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/trunk/PLDLiveInstaller.h
==============================================================================
--- PLDLiveInstaller/trunk/PLDLiveInstaller.h	(original)
+++ PLDLiveInstaller/trunk/PLDLiveInstaller.h	Mon Dec  6 11:34:58 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/trunk/Version.h
==============================================================================
--- PLDLiveInstaller/trunk/Version.h	(original)
+++ PLDLiveInstaller/trunk/Version.h	Mon Dec  6 11:34:58 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