|
@ -307,6 +307,7 @@ bool copyCopyrightFile(QString libPath){ |
|
|
myProcess->start(dpkgPath, arguments); |
|
|
myProcess->start(dpkgPath, arguments); |
|
|
myProcess->waitForFinished(); |
|
|
myProcess->waitForFinished(); |
|
|
QString strOut = myProcess->readAllStandardOutput().split(':')[0]; |
|
|
QString strOut = myProcess->readAllStandardOutput().split(':')[0]; |
|
|
|
|
|
myProcess.close(); |
|
|
if(strOut == "") return false; |
|
|
if(strOut == "") return false; |
|
|
|
|
|
|
|
|
/* Find out the copyright file in that package */ |
|
|
/* Find out the copyright file in that package */ |
|
@ -314,6 +315,7 @@ bool copyCopyrightFile(QString libPath){ |
|
|
myProcess->start(dpkgQueryPath, arguments); |
|
|
myProcess->start(dpkgQueryPath, arguments); |
|
|
myProcess->waitForFinished(); |
|
|
myProcess->waitForFinished(); |
|
|
strOut = myProcess->readAllStandardOutput(); |
|
|
strOut = myProcess->readAllStandardOutput(); |
|
|
|
|
|
myProcess.close(); |
|
|
|
|
|
|
|
|
QStringList outputLines = strOut.split("\n", QString::SkipEmptyParts); |
|
|
QStringList outputLines = strOut.split("\n", QString::SkipEmptyParts); |
|
|
|
|
|
|
|
@ -355,6 +357,7 @@ LddInfo findDependencyInfo(const QString &binaryPath) |
|
|
QProcess ldd; |
|
|
QProcess ldd; |
|
|
ldd.start("ldd", QStringList() << binaryPath); |
|
|
ldd.start("ldd", QStringList() << binaryPath); |
|
|
ldd.waitForFinished(); |
|
|
ldd.waitForFinished(); |
|
|
|
|
|
myProcess.close(); |
|
|
|
|
|
|
|
|
if (ldd.exitStatus() != QProcess::NormalExit || ldd.exitCode() != 0) { |
|
|
if (ldd.exitStatus() != QProcess::NormalExit || ldd.exitCode() != 0) { |
|
|
LogError() << "findDependencyInfo:" << ldd.readAllStandardError(); |
|
|
LogError() << "findDependencyInfo:" << ldd.readAllStandardError(); |
|
@ -610,6 +613,7 @@ QSet<QString> getBinaryRPaths(const QString &path, bool resolve = true, QString |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
objdump.waitForFinished(); |
|
|
objdump.waitForFinished(); |
|
|
|
|
|
objdump.close(); |
|
|
|
|
|
|
|
|
if (objdump.exitCode() != 0) { |
|
|
if (objdump.exitCode() != 0) { |
|
|
LogError() << "getBinaryRPaths:" << objdump.readAllStandardError(); |
|
|
LogError() << "getBinaryRPaths:" << objdump.readAllStandardError(); |
|
@ -776,6 +780,7 @@ QString runPatchelf(QStringList options) |
|
|
exit(1); |
|
|
exit(1); |
|
|
} |
|
|
} |
|
|
patchelftool.waitForFinished(); |
|
|
patchelftool.waitForFinished(); |
|
|
|
|
|
patchelftool.close(); |
|
|
if (patchelftool.exitCode() != 0) { |
|
|
if (patchelftool.exitCode() != 0) { |
|
|
LogError() << "runPatchelf:" << patchelftool.readAllStandardError(); |
|
|
LogError() << "runPatchelf:" << patchelftool.readAllStandardError(); |
|
|
// LogError() << "runPatchelf:" << patchelftool.readAllStandardOutput();
|
|
|
// LogError() << "runPatchelf:" << patchelftool.readAllStandardOutput();
|
|
@ -924,6 +929,7 @@ void runStrip(const QString &binaryPath) |
|
|
// exit(1); // Do not exit because this could be a script that patchelf can't work on
|
|
|
// exit(1); // Do not exit because this could be a script that patchelf can't work on
|
|
|
} |
|
|
} |
|
|
patchelfread.waitForFinished(); |
|
|
patchelfread.waitForFinished(); |
|
|
|
|
|
patchelfread.close(); |
|
|
|
|
|
|
|
|
if (patchelfread.exitCode() != 0){ |
|
|
if (patchelfread.exitCode() != 0){ |
|
|
LogError() << "Error reading rpath with patchelf" << QFileInfo(resolvedPath).completeBaseName() << ":" << patchelfread.readAllStandardError(); |
|
|
LogError() << "Error reading rpath with patchelf" << QFileInfo(resolvedPath).completeBaseName() << ":" << patchelfread.readAllStandardError(); |
|
@ -953,6 +959,7 @@ void runStrip(const QString &binaryPath) |
|
|
exit(1); |
|
|
exit(1); |
|
|
} |
|
|
} |
|
|
strip.waitForFinished(); |
|
|
strip.waitForFinished(); |
|
|
|
|
|
strip.close(); |
|
|
|
|
|
|
|
|
if (strip.exitCode() == 0) |
|
|
if (strip.exitCode() == 0) |
|
|
return; |
|
|
return; |
|
@ -1052,7 +1059,7 @@ static QString captureOutput(const QString &command) |
|
|
QProcess process; |
|
|
QProcess process; |
|
|
process.start(command, QIODevice::ReadOnly); |
|
|
process.start(command, QIODevice::ReadOnly); |
|
|
process.waitForFinished(); |
|
|
process.waitForFinished(); |
|
|
|
|
|
process.close(); |
|
|
if (process.exitStatus() != QProcess::NormalExit) { |
|
|
if (process.exitStatus() != QProcess::NormalExit) { |
|
|
LogError() << command << "crashed:" << process.readAllStandardError(); |
|
|
LogError() << command << "crashed:" << process.readAllStandardError(); |
|
|
} else if (process.exitCode() != 0) { |
|
|
} else if (process.exitCode() != 0) { |
|
@ -1518,7 +1525,7 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo, |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
qmlImportScanner.waitForFinished(); |
|
|
qmlImportScanner.waitForFinished(); |
|
|
|
|
|
qmlImportScanner.close(); |
|
|
// log qmlimportscanner errors
|
|
|
// log qmlimportscanner errors
|
|
|
qmlImportScanner.setReadChannel(QProcess::StandardError); |
|
|
qmlImportScanner.setReadChannel(QProcess::StandardError); |
|
|
QByteArray errors = qmlImportScanner.readAll(); |
|
|
QByteArray errors = qmlImportScanner.readAll(); |
|
|