优化,以防问题:135259 【2203自适应升级2209】控制面板备份后升级到2209,系统还原后,关于界面存在系统补丁版本号
This commit is contained in:
parent
c1d52cfdf4
commit
b98813d429
|
@ -296,7 +296,8 @@ void CustomizeSystemRestoreProxy::restoreSystem()
|
|||
fileIfSync.replace("//", "/");
|
||||
QFileInfo file(fileIfSync);
|
||||
QDateTime beginTime = file.fileTime(QFileDevice::FileModificationTime);
|
||||
Utils::wait(10);
|
||||
QProcess::execute("sync");
|
||||
Utils::wait(20);
|
||||
Utils::updateSyncFile();
|
||||
while (1) {
|
||||
Utils::wait(2);
|
||||
|
|
|
@ -90,17 +90,21 @@ void RsyncPathToDirProcess::rsync_finished(int exitCode, QProcess::ExitStatus)
|
|||
qDebug() << "RsyncPathToDirProcess::rsync_finished invoke begin";
|
||||
if (exitCode == QProcess::NormalExit || exitCode == 24 || exitCode == 23) {
|
||||
if (m_block) {
|
||||
qDebug() << "RsyncPathToDirProcess::rsync_finished block mode";
|
||||
m_bSuccess = true;
|
||||
emit progress(100);
|
||||
emit finished(true);
|
||||
} else {
|
||||
qDebug() << "RsyncPathToDirProcess::rsync_finished unblock mode";
|
||||
m_syncProcess->start("sync");
|
||||
if (!m_syncProcess->waitForStarted()) {
|
||||
qDebug() << "sync start failed";
|
||||
m_bSuccess = false;
|
||||
emit finished(false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
qDebug() << "RsyncPathToDirProcess::rsync_finished failed";
|
||||
m_bSuccess = false;
|
||||
emit finished(false);
|
||||
}
|
||||
|
@ -112,10 +116,12 @@ void RsyncPathToDirProcess::sync_finished(int exitCode, QProcess::ExitStatus)
|
|||
qDebug() << "RsyncPathToDirProcess::sync_finished invoke begin";
|
||||
|
||||
if (exitCode == QProcess::NormalExit || exitCode == 24 || exitCode == 23) {
|
||||
qDebug() << "RsyncPathToDirProcess::sync_finished success";
|
||||
m_bSuccess = true;
|
||||
emit progress(100);
|
||||
emit finished(true);
|
||||
} else {
|
||||
qDebug() << "RsyncPathToDirProcess::sync_finished failed";
|
||||
m_bSuccess = false;
|
||||
emit finished(false);
|
||||
}
|
||||
|
|
|
@ -363,7 +363,8 @@ void SystemRestoreProxy::restoreSystem()
|
|||
// removeHome(Utils::getSysRootPath() + "/home");
|
||||
// removeHome(Utils::getSysRootPath() + "/data/home");
|
||||
// }
|
||||
Utils::wait(10);
|
||||
QProcess::execute("sync");
|
||||
Utils::wait(20);
|
||||
Utils::updateSyncFile();
|
||||
while (1) {
|
||||
Utils::wait(2);
|
||||
|
|
|
@ -411,7 +411,9 @@ void UDiskSystemRestoreProxy::restoreSystem()
|
|||
fileIfSync.replace("//", "/");
|
||||
QFileInfo file(fileIfSync);
|
||||
QDateTime beginTime = file.fileTime(QFileDevice::FileModificationTime);
|
||||
Utils::wait(10);
|
||||
// sync();
|
||||
QProcess::execute("sync");
|
||||
Utils::wait(20);
|
||||
Utils::updateSyncFile();
|
||||
while (1) {
|
||||
Utils::wait(2);
|
||||
|
@ -422,9 +424,10 @@ void UDiskSystemRestoreProxy::restoreSystem()
|
|||
}
|
||||
|
||||
if (m_backupWrapper.m_isOtherMachine) {
|
||||
Utils::wait(20);
|
||||
Utils::wait(10);
|
||||
updateGrubUUid();
|
||||
sync();
|
||||
QProcess::execute("sync");
|
||||
Utils::wait(5);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue