summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/ipkg.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/aqpkg/ipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/ipkg.cpp23
1 files changed, 15 insertions, 8 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
@@ -42,5 +42,5 @@ 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
// file (if stored locally) or just the name of the package (for a network package)
@@ -90,5 +90,4 @@ bool Ipkg :: runIpkg( )
flags ^= MAKE_LINKS;
}
-
}
@@ -98,14 +97,21 @@ bool Ipkg :: runIpkg( )
#endif
- cmd += " " + option;
+
+ if ( option == "reinstall" )
+ cmd += " install";
+ else
+ cmd += " " + option;
if ( option != "upgrade" )
cmd += " " + package;
cmd += " 2>&1";
+
+ emit outputText( QString( "Dealing with package " ) + package );
+
qApp->processEvents();
// If we are removing packages and make links option is selected
// create the links
- if ( option == "remove" )
+ if ( option == "remove" || option == "reinstall" )
{
createLinks = false;
@@ -126,5 +132,5 @@ bool Ipkg :: runIpkg( )
ret = executeIpkgCommand( cmd, option );
- if ( option == "install" )
+ if ( option == "install" || option == "reinstall" )
{
// If we are not removing packages and make links option is selected
@@ -154,4 +160,5 @@ bool Ipkg :: runIpkg( )
emit outputText( QString( "Finished - status=" ) + (ret ? "success" : "failure") );
+ emit outputText( "" );
return ret;
}
@@ -183,5 +190,5 @@ int Ipkg :: executeIpkgCommand( QString &cmd, const QString option )
{
//See if we're finished
- if ( option == "install" )
+ if ( option == "install" || option == "reinstall" )
{
// Need to keep track of any dependant packages that get installed
@@ -243,9 +250,9 @@ QStringList* Ipkg :: getList( const QString &packageFilename, const QString &des
QFile f( packageFileDir );
- cout << "Try to open " << packageFileDir.latin1() << endl;
+ cout << "Try to open " << packageFileDir << endl;
if ( !f.open(IO_ReadOnly) )
{
// Couldn't open from dest, try from /
-// cout << "Could not open:" << packageFileDir << endl;
+ cout << "Could not open:" << packageFileDir << endl;
f.close();