From f4007b261a7a4dc9672a1806be50ea16ccfc84f1 Mon Sep 17 00:00:00 2001 From: andyq Date: Fri, 25 Oct 2002 14:37:28 +0000 Subject: Hopefully handles upgrading to newer packages correctly --- (limited to 'noncore/settings/aqpkg/installdlgimpl.cpp') 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 &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 ); -- cgit v0.9.0.2