Diffstat (limited to 'noncore/settings/aqpkg/ipkg.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp index 6d0edad..02d4258 100644 --- a/noncore/settings/aqpkg/ipkg.cpp +++ b/noncore/settings/aqpkg/ipkg.cpp @@ -43,3 +43,3 @@ Ipkg :: ~Ipkg() -// Option is what we are going to do - install, upgrade, download +// Option is what we are going to do - install, upgrade, download, reinstall // package is the package name to install - either a fully qualified path and ipk @@ -91,3 +91,2 @@ bool Ipkg :: runIpkg( ) } - } @@ -99,2 +98,6 @@ bool Ipkg :: runIpkg( ) + + if ( option == "reinstall" ) + cmd += " install"; + else cmd += " " + option; @@ -104,2 +107,5 @@ bool Ipkg :: runIpkg( ) + + emit outputText( QString( "Dealing with package " ) + package ); + qApp->processEvents(); @@ -108,3 +114,3 @@ bool Ipkg :: runIpkg( ) // create the links - if ( option == "remove" ) + if ( option == "remove" || option == "reinstall" ) { @@ -127,3 +133,3 @@ bool Ipkg :: runIpkg( ) - if ( option == "install" ) + if ( option == "install" || option == "reinstall" ) { @@ -155,2 +161,3 @@ bool Ipkg :: runIpkg( ) emit outputText( QString( "Finished - status=" ) + (ret ? "success" : "failure") ); + emit outputText( "" ); return ret; @@ -184,3 +191,3 @@ int Ipkg :: executeIpkgCommand( QString &cmd, const QString option ) //See if we're finished - if ( option == "install" ) + if ( option == "install" || option == "reinstall" ) { @@ -244,3 +251,3 @@ QStringList* Ipkg :: getList( const QString &packageFilename, const QString &des - cout << "Try to open " << packageFileDir.latin1() << endl; + cout << "Try to open " << packageFileDir << endl; if ( !f.open(IO_ReadOnly) ) @@ -248,3 +255,3 @@ QStringList* Ipkg :: getList( const QString &packageFilename, const QString &des // Couldn't open from dest, try from / -// cout << "Could not open:" << packageFileDir << endl; + cout << "Could not open:" << packageFileDir << endl; f.close(); |