Diffstat (limited to 'noncore/settings/aqpkg/ipkg.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 13 |
1 files changed, 7 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() | |||
54 | // dest is the destination alias (from ipk.conf) | 54 | // dest is the destination alias (from ipk.conf) |
55 | // destDir is the dir that the destination alias points to (used to link to root) | 55 | // destDir is the dir that the destination alias points to (used to link to root) |
56 | // flags is the ipkg options flags | 56 | // flags is the ipkg options flags |
57 | // dir is the directory to run ipkg in (defaults to "") | 57 | // dir is the directory to run ipkg in (defaults to "") |
58 | bool Ipkg :: runIpkg( ) | 58 | bool Ipkg :: runIpkg( ) |
59 | { | 59 | { |
60 | error = false; | ||
60 | bool ret = false; | 61 | bool ret = false; |
61 | QStringList commands; | 62 | QStringList commands; |
62 | 63 | ||
63 | QDir::setCurrent( "/tmp" ); | 64 | QDir::setCurrent( "/tmp" ); |
64 | 65 | ||
65 | if ( runtimeDir != "" ) | 66 | if ( runtimeDir != "" ) |
@@ -165,18 +166,12 @@ bool Ipkg :: runIpkg( ) | |||
165 | } | 166 | } |
166 | } | 167 | } |
167 | } | 168 | } |
168 | 169 | ||
169 | delete dependantPackages; | 170 | delete dependantPackages; |
170 | 171 | ||
171 | // Finally, if we are removing a package, remove its entry from the <destdir>/usr/lib/ipkg/status file | ||
172 | // to workaround an ipkg bug which stops reinstall to a different location | ||
173 | if ( option == "remove" ) | ||
174 | removeStatusEntry(); | ||
175 | |||
176 | |||
177 | emit outputText( "Finished" ); | 172 | emit outputText( "Finished" ); |
178 | emit outputText( "" ); | 173 | emit outputText( "" ); |
179 | return ret; | 174 | return ret; |
180 | 175 | ||
181 | } | 176 | } |
182 | 177 | ||
@@ -337,16 +332,22 @@ void Ipkg::commandStderr(OProcess*, char *buffer, int buflen) | |||
337 | QString lineStr = buffer; | 332 | QString lineStr = buffer; |
338 | if ( lineStr[buflen-1] == '\n' ) | 333 | if ( lineStr[buflen-1] == '\n' ) |
339 | buflen --; | 334 | buflen --; |
340 | lineStr=lineStr.left( buflen ); | 335 | lineStr=lineStr.left( buflen ); |
341 | emit outputText( lineStr ); | 336 | emit outputText( lineStr ); |
342 | buffer[0] = '\0'; | 337 | buffer[0] = '\0'; |
338 | error = true; | ||
343 | } | 339 | } |
344 | 340 | ||
345 | void Ipkg::processFinished() | 341 | void Ipkg::processFinished() |
346 | { | 342 | { |
343 | // Finally, if we are removing a package, remove its entry from the <destdir>/usr/lib/ipkg/status file | ||
344 | // to workaround an ipkg bug which stops reinstall to a different location | ||
345 | if ( !error && option == "remove" ) | ||
346 | removeStatusEntry(); | ||
347 | |||
347 | delete proc; | 348 | delete proc; |
348 | proc = 0; | 349 | proc = 0; |
349 | finished = true; | 350 | finished = true; |
350 | } | 351 | } |
351 | 352 | ||
352 | 353 | ||