Fix for Failed to upload package: Failure on QtCreator

Just got hit by this problem, whenever I tried to deploy my application:

    11:06:04: Package created.
    11:06:04: Installing package to sysroot ...
    Package 'untitled' installed.

    11:06:04: Preparing SFTP connection...
    11:06:04: Starting upload...
    11:06:04: Failed to upload package: Failure
    11:06:04: Deploy step failed.
    Error while building project untitled (target: Harmattan)
    When executing build step 'Deploy Debian package via SFTP upload'

And a notification warning about the little remaining data storage appeared on the device, which I wrongly ignored at first. The problem occurs because QtCreator tries to copy the debian packate to /tmp on the device, N9 for me, and it fails if the space is full. I managed to fill my /tmp partition (which is just 4Mb btw..) by testing some big application. Solution is, ssh to your device, check if you /tmp is full (df -h) and delete any .deb file left there by QtCreator.

/home/developer $ df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.9G      1.7G      2.0G  47% /
devtmpfs                 10.0M    248.0K      9.8M   2% /dev
tmpfs                     4.0M      4.0M         0 100% /tmp
tmpfs                   512.0K    148.0K    364.0K  29% /var/run
..
/dev/mmcblk0p3            2.0G    197.7M      1.7G  10% /home
/tmp $ cd /tmp && ls -al
total 4096
..
-rw-r--r--    1 user     develope         0 Feb  7 09:59 qstardict_0.0.3_armel.deb
-rw-r--r--    1 user     develope         0 Feb  7 10:06 qstardict_0.0.4_armel.deb
-rw-r--r--    1 user     develope   4116480 Feb  3 21:32 qxmpp_0.0.1_armel.deb
..
/tmp $ rm qstardict_0.0.3_armel.deb
/tmp $ rm qxmpp_0.0.1_armel.deb
/tmp $ rm qstardict_0.0.4_armel.deb

UPDATE: This is supposed to be fixed on QtCreator 2.5 according to https://bugreports.qt-project.org/browse/QTCREATORBUG-6859

Patch is here if you don’t want to wait 🙂 : http://qt.gitorious.org/+qtcn/qt-creator/qtcn-qt-creator/commit/b7d02e08fa246f3d45c898dc2480143a372409f0