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
@@ -89,9 +89,9 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *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";
}
@@ -207,11 +207,14 @@ void InstallDlgImpl :: installSelected()
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 );
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
@@ -27,9 +27,9 @@ using namespace std;
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;
};
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
@@ -62,14 +62,12 @@ bool Ipkg :: runIpkg( )
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 )
@@ -100,9 +98,9 @@ bool Ipkg :: runIpkg( )
if ( option == "reinstall" )
cmd += " install";
else
cmd += " " + option;
- if ( option != "upgrade" )
+ if ( package != "" )
cmd += " " + package;
cmd += " 2>&1";
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
@@ -558,9 +558,13 @@ 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;
}