[PC-BSD Commits] r6224 - pcbsd/trunk/SoftwareManager
svn at pcbsd.org
svn at pcbsd.org
Thu Feb 11 08:27:24 PST 2010
Author: kris
Date: 2010-02-11 08:27:24 -0800 (Thu, 11 Feb 2010)
New Revision: 6224
Modified:
pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp
Log:
Fixed issue with PBI updates, seems the kio process sometimes laggs a bit
when renaming the resulting .part file to the real name, need to give about
a 5-10 second cushion to allow that to finish
Modified: pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp 2010-02-10 20:12:02 UTC (rev 6223)
+++ pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp 2010-02-11 16:27:24 UTC (rev 6224)
@@ -398,7 +398,7 @@
item->removeTmpFile();
// Start the copy job
- copyJob = KIO::file_copy(item->getDownloadURL(), item->getDownloadFile() + ".tmp", -1, KIO::HideProgressInfo);
+ copyJob = KIO::file_copy(item->getDownloadURL(), item->getDownloadFile(), -1, KIO::HideProgressInfo);
connect(copyJob, SIGNAL(totalSize(KJob*, qulonglong)), this, SLOT(slotJobUpdateTotalSize( KJob*, qulonglong)));
connect(copyJob, SIGNAL(speed(KJob*, unsigned long)), this, SLOT(slotJobUpdateSpeed( KJob*, unsigned long)));
connect(copyJob, SIGNAL(processedSize(KJob*, qulonglong)), this, SLOT(slotJobUpdateProcessedSize( KJob*, qulonglong)));
@@ -435,11 +435,6 @@
QFile::remove(item->getDownloadFile() );
}
- // Rename the .tmp file to the regular PBI name
- QString mvcmd = "mv " + item->getDownloadFile() + ".tmp" \
- + " " + item->getDownloadFile();
- system(mvcmd.toLatin1());
-
// The download finished, lets start the install / upgrade
slotStartPBIInstall();
}
@@ -474,6 +469,7 @@
{
item->setStatusText(tr("Upgrading..."));
+ stream4 << "sleep 10\n";
stream4 << "MD5=\"`cat '" + item->getDownloadFile() + "' | md5`\"\n";
stream4 << "if [ \"${MD5}\" != \"" + item->getDownloadMD5() + "\" ]\n";
stream4 << "then\n";
More information about the Commits
mailing list