Commit 5a9a1895 authored by Aard's avatar Aard

Warn if kickstarter can't write kickstart file

parent 44e6a2be
* Sat Apr 06 2013 Bernd Wachter <bernd.wachter@jollamobile.com> - 0.31.3
- Add warning when updating repos as non-root to ssu cli
- Rewrite repo files on flavour, release and mode changes
- Warn if kickstarter can't write kickstart file
* Fri Apr 05 2013 Bernd Wachter <bernd.wachter@jollamobile.com> - 0.31.2
- Add DisplayName for imager
......
Name: ssu
Version: 0.31.2
Version: 0.31.3
Release: 1
Summary: SSU enabler for RND
Group: System/Base
......
......@@ -218,23 +218,32 @@ bool SsuKickstarter::write(QString kickstart){
if (!repoOverride.contains("deviceModel"))
repoOverride.insert("deviceModel", deviceInfo.deviceModel());
bool opened = false;
QString outputDir = repoOverride.value("outputdir");
if (!outputDir.isEmpty()) outputDir.append("/");
if (kickstart.isEmpty()){
if (repoOverride.contains("filename")){
QString fileName = QString("%1/%2")
.arg(repoOverride.value("outputdir"))
QString fileName = QString("%1%2")
.arg(outputDir)
.arg(var.resolveString(repoOverride.value("filename"), &repoOverride));
ks.setFileName(fileName);
ks.open(QIODevice::WriteOnly);
opened = ks.open(QIODevice::WriteOnly);
} else {
qerr << "No filename specified, and no default filename configured" << endl;
return false;
}
} else if (kickstart == "-")
ks.open(stdout, QIODevice::WriteOnly);
opened = ks.open(stdout, QIODevice::WriteOnly);
else {
ks.setFileName(repoOverride.value("outputdir") + kickstart);
ks.open(QIODevice::WriteOnly);
ks.setFileName(outputDir + kickstart);
opened = ks.open(QIODevice::WriteOnly);
}
if (!opened) {
qerr << "Unable to write output file " << ks.fileName() << ": " << ks.errorString() << endl;
return false;
}
QString displayName = QString("# DisplayName: %1 %2/%3 (%4) %5")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment