author | andyq <andyq> | 2002-10-25 14:37:28 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-10-25 14:37:28 (UTC) |
commit | f4007b261a7a4dc9672a1806be50ea16ccfc84f1 (patch) (side-by-side diff) | |
tree | 5a2469d149be879bd221a1d1f07d9cab7cab5a49 /noncore/settings/aqpkg/installdlgimpl.cpp | |
parent | 3421736c248c6ca7171bafdf3af9e2edf94eb593 (diff) | |
download | opie-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) (show whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.cpp | 7 |
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 @@ -90,7 +90,7 @@ 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"; @@ -208,9 +208,12 @@ void InstallDlgImpl :: installSelected() } 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 ); |