-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 13 | ||||
-rw-r--r-- | noncore/settings/aqpkg/ipkg.h | 1 |
2 files changed, 8 insertions, 6 deletions
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp index 51eca8b..e66c02d 100644 --- a/noncore/settings/aqpkg/ipkg.cpp +++ b/noncore/settings/aqpkg/ipkg.cpp @@ -54,12 +54,13 @@ Ipkg :: ~Ipkg() // dest is the destination alias (from ipk.conf) // destDir is the dir that the destination alias points to (used to link to root) // flags is the ipkg options flags // dir is the directory to run ipkg in (defaults to "") bool Ipkg :: runIpkg( ) { + error = false; bool ret = false; QStringList commands; QDir::setCurrent( "/tmp" ); if ( runtimeDir != "" ) @@ -165,18 +166,12 @@ bool Ipkg :: runIpkg( ) } } } delete dependantPackages; - // Finally, if we are removing a package, remove its entry from the <destdir>/usr/lib/ipkg/status file - // to workaround an ipkg bug which stops reinstall to a different location - if ( option == "remove" ) - removeStatusEntry(); - - emit outputText( "Finished" ); emit outputText( "" ); return ret; } @@ -337,16 +332,22 @@ void Ipkg::commandStderr(OProcess*, char *buffer, int buflen) QString lineStr = buffer; if ( lineStr[buflen-1] == '\n' ) buflen --; lineStr=lineStr.left( buflen ); emit outputText( lineStr ); buffer[0] = '\0'; + error = true; } void Ipkg::processFinished() { + // Finally, if we are removing a package, remove its entry from the <destdir>/usr/lib/ipkg/status file + // to workaround an ipkg bug which stops reinstall to a different location + if ( !error && option == "remove" ) + removeStatusEntry(); + delete proc; proc = 0; finished = true; } diff --git a/noncore/settings/aqpkg/ipkg.h b/noncore/settings/aqpkg/ipkg.h index f08667b..d49bb04 100644 --- a/noncore/settings/aqpkg/ipkg.h +++ b/noncore/settings/aqpkg/ipkg.h @@ -62,12 +62,13 @@ public slots: void abort(); private: bool createLinks; bool aborted; + bool error; QString option; QString package; QString destination; QString destDir; QString runtimeDir; OProcess *proc; |