summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/installdlgimpl.cpp
authorandyq <andyq>2002-10-25 14:37:28 (UTC)
committer andyq <andyq>2002-10-25 14:37:28 (UTC)
commitf4007b261a7a4dc9672a1806be50ea16ccfc84f1 (patch) (side-by-side diff)
tree5a2469d149be879bd221a1d1f07d9cab7cab5a49 /noncore/settings/aqpkg/installdlgimpl.cpp
parent3421736c248c6ca7171bafdf3af9e2edf94eb593 (diff)
downloadopie-f4007b261a7a4dc9672a1806be50ea16ccfc84f1.zip
opie-f4007b261a7a4dc9672a1806be50ea16ccfc84f1.tar.gz
opie-f4007b261a7a4dc9672a1806be50ea16ccfc84f1.tar.bz2
Hopefully handles upgrading to newer packages correctly
Diffstat (limited to 'noncore/settings/aqpkg/installdlgimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp7
1 files changed, 5 insertions, 2 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
@@ -81,25 +81,25 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d
{
InstallData item = *it;
if ( item.option == "I" )
{
installList.push_back( item );
install += " " + item.packageName + "\n";
}
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";
}
}
output->setText( remove + install + upgrade );
}
InstallDlgImpl::InstallDlgImpl( Ipkg *ipkg, QString initialText, QWidget *parent, const char *name, bool modal, WFlags fl )
: InstallDlg( parent, name, modal, fl )
{
@@ -199,27 +199,30 @@ void InstallDlgImpl :: installSelected()
pIpkg->setOption( "install" );
pIpkg->setDestination( dest );
pIpkg->setDestinationDir( destDir );
pIpkg->setFlags( instFlags );
for ( it = installList.begin() ; it != installList.end() ; ++it )
{
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 )
tmpFlags |= MAKE_LINKS;
pIpkg->setFlags( tmpFlags );
pIpkg->runIpkg();
}
delete pIpkg;