Don't fail when moving to the temp directory when installing
ClosedPublic

Authored by apol on Jan 27 2017, 10:42 PM.

Details

Summary

The process to install a kpackage package through knewstuff is:

  • download to /tmp
  • copy to /tmp with the desired filename
  • call the install command against the file

This fixes the second step. Sometimes the first download failed or
something, this would make any subsequent attempts fail because
QFile::rename doesn't work if the file is already present.

We were using the QProcess API wrongly

The executable wasn't decoded so it even started, which means not ever
emitting finished

Test Plan

Now I could download properly the Look and Feel packages from the kcm.

Diff Detail

Repository
R304 KNewStuff
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol updated this revision to Diff 10644.Jan 27 2017, 10:42 PM
apol retitled this revision from to Don't fail when moving to the temp directory when installing.
apol updated this object.
apol edited the test plan for this revision. (Show Details)
apol added reviewers: Frameworks, mart.
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 27 2017, 10:42 PM
mart accepted this revision.Jan 28 2017, 5:02 PM
mart edited edge metadata.
mart added inline comments.
src/core/installation.cpp
546

if () {

}

also, add a comment on what is doing here

This revision is now accepted and ready to land.Jan 28 2017, 5:02 PM
This revision was automatically updated to reflect the committed changes.