summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp7
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.h2
-rw-r--r--noncore/settings/aqpkg/ipkg.cpp8
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp4
4 files changed, 13 insertions, 8 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp
index f5aef94..83f983a 100644
--- a/noncore/settings/aqpkg/installdlgimpl.cpp
+++ b/noncore/settings/aqpkg/installdlgimpl.cpp
@@ -87,13 +87,13 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d
}
else if ( item.option == "D" )
{
removeList.push_back( item );
remove += " " + item.packageName + "\n";
}
- else if ( item.option == "U" )
+ else if ( item.option == "U" || item.option == "R" )
{
updateList.push_back( item );
upgrade += " " + item.packageName + "\n";
}
}
@@ -205,15 +205,18 @@ void InstallDlgImpl :: installSelected()
{
pIpkg->setPackage( it->packageName );
pIpkg->runIpkg();
}
flags |= FORCE_REINSTALL;
- pIpkg->setOption( "reinstall" );
for ( it = updateList.begin() ; it != updateList.end() ; ++it )
{
+ if ( it->option == "R" )
+ pIpkg->setOption( "reinstall" );
+ else
+ pIpkg->setOption( "upgrade" );
pIpkg->setDestination( it->destination->getDestinationName() );
pIpkg->setDestinationDir( it->destination->getDestinationPath() );
pIpkg->setPackage( it->packageName );
int tmpFlags = flags;
if ( it->destination->linkToRoot() && it->recreateLinks )
diff --git a/noncore/settings/aqpkg/installdlgimpl.h b/noncore/settings/aqpkg/installdlgimpl.h
index 6716ced..9819b2e 100644
--- a/noncore/settings/aqpkg/installdlgimpl.h
+++ b/noncore/settings/aqpkg/installdlgimpl.h
@@ -25,13 +25,13 @@ using namespace std;
#include "ipkg.h"
#include "install.h"
class InstallData
{
public:
- QString option; // I - install, D - delete, U - upgrade
+ QString option; // I - install, D - delete, R- reinstall U - upgrade
QString packageName;
Destination *destination;
bool recreateLinks;
};
class InstallDlgImpl : public InstallDlg
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp
index 368548b..731a336 100644
--- a/noncore/settings/aqpkg/ipkg.cpp
+++ b/noncore/settings/aqpkg/ipkg.cpp
@@ -60,18 +60,16 @@ bool Ipkg :: runIpkg( )
if ( runtimeDir != "" )
{
cmd += "cd ";
cmd += runtimeDir;
cmd += " ; ";
}
- cmd += "ipkg";
-
- if ( option != "update" && option != "download" && option != "upgrade" )
+ cmd += "ipkg -force-defaults";
+ if ( option != "update" && option != "download" )
{
cmd += " -dest "+ destination;
- cmd += " -force-defaults";
if ( flags & FORCE_DEPENDS )
cmd += " -force-depends";
if ( flags & FORCE_REINSTALL )
cmd += " -force-reinstall";
if ( flags & FORCE_REMOVE )
@@ -98,13 +96,13 @@ bool Ipkg :: runIpkg( )
if ( option == "reinstall" )
cmd += " install";
else
cmd += " " + option;
- if ( option != "upgrade" )
+ if ( package != "" )
cmd += " " + package;
cmd += " 2>&1";
if ( package != "" )
emit outputText( QString( "Dealing with package " ) + package );
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index a374266..3971aea 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -556,13 +556,17 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
}
// Check if we are reinstalling the same version
if ( p->getVersion() != p->getInstalledVersion() )
item.recreateLinks = true;
else
+ {
+ if ( item.option == "U" )
+ item.option = "R";
item.recreateLinks = false;
+ }
// User hit cancel (on dlg - assume remove)
return item;
}
}