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 | |
parent | 3421736c248c6ca7171bafdf3af9e2edf94eb593 (diff) | |
download | opie-f4007b261a7a4dc9672a1806be50ea16ccfc84f1.zip opie-f4007b261a7a4dc9672a1806be50ea16ccfc84f1.tar.gz opie-f4007b261a7a4dc9672a1806be50ea16ccfc84f1.tar.bz2 |
Hopefully handles upgrading to newer packages correctly
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.cpp | 7 | ||||
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.h | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 8 | ||||
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 4 |
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 @@ -92,3 +92,3 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d } - else if ( item.option == "U" ) + else if ( item.option == "U" || item.option == "R" ) { @@ -210,5 +210,8 @@ 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() ); 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 @@ -30,3 +30,3 @@ class InstallData public: - QString option; // I - install, D - delete, U - upgrade + QString option; // I - install, D - delete, R- reinstall U - upgrade QString packageName; 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 @@ -65,8 +65,6 @@ bool Ipkg :: runIpkg( ) } - cmd += "ipkg"; - - if ( option != "update" && option != "download" && option != "upgrade" ) + cmd += "ipkg -force-defaults"; + if ( option != "update" && option != "download" ) { cmd += " -dest "+ destination; - cmd += " -force-defaults"; @@ -103,3 +101,3 @@ bool Ipkg :: runIpkg( ) cmd += " " + option; - if ( option != "upgrade" ) + if ( package != "" ) cmd += " " + 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 @@ -561,3 +561,7 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) else + { + if ( item.option == "U" ) + item.option = "R"; item.recreateLinks = false; + } |