-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 | |||
@@ -87,13 +87,13 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d | |||
87 | } | 87 | } |
88 | else if ( item.option == "D" ) | 88 | else if ( item.option == "D" ) |
89 | { | 89 | { |
90 | removeList.push_back( item ); | 90 | removeList.push_back( item ); |
91 | remove += " " + item.packageName + "\n"; | 91 | remove += " " + item.packageName + "\n"; |
92 | } | 92 | } |
93 | else if ( item.option == "U" ) | 93 | else if ( item.option == "U" || item.option == "R" ) |
94 | { | 94 | { |
95 | updateList.push_back( item ); | 95 | updateList.push_back( item ); |
96 | upgrade += " " + item.packageName + "\n"; | 96 | upgrade += " " + item.packageName + "\n"; |
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | ||
@@ -205,15 +205,18 @@ void InstallDlgImpl :: installSelected() | |||
205 | { | 205 | { |
206 | pIpkg->setPackage( it->packageName ); | 206 | pIpkg->setPackage( it->packageName ); |
207 | pIpkg->runIpkg(); | 207 | pIpkg->runIpkg(); |
208 | } | 208 | } |
209 | 209 | ||
210 | flags |= FORCE_REINSTALL; | 210 | flags |= FORCE_REINSTALL; |
211 | pIpkg->setOption( "reinstall" ); | ||
212 | for ( it = updateList.begin() ; it != updateList.end() ; ++it ) | 211 | for ( it = updateList.begin() ; it != updateList.end() ; ++it ) |
213 | { | 212 | { |
213 | if ( it->option == "R" ) | ||
214 | pIpkg->setOption( "reinstall" ); | ||
215 | else | ||
216 | pIpkg->setOption( "upgrade" ); | ||
214 | pIpkg->setDestination( it->destination->getDestinationName() ); | 217 | pIpkg->setDestination( it->destination->getDestinationName() ); |
215 | pIpkg->setDestinationDir( it->destination->getDestinationPath() ); | 218 | pIpkg->setDestinationDir( it->destination->getDestinationPath() ); |
216 | pIpkg->setPackage( it->packageName ); | 219 | pIpkg->setPackage( it->packageName ); |
217 | 220 | ||
218 | int tmpFlags = flags; | 221 | int tmpFlags = flags; |
219 | if ( it->destination->linkToRoot() && it->recreateLinks ) | 222 | if ( it->destination->linkToRoot() && it->recreateLinks ) |
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 | |||
@@ -25,13 +25,13 @@ using namespace std; | |||
25 | #include "ipkg.h" | 25 | #include "ipkg.h" |
26 | #include "install.h" | 26 | #include "install.h" |
27 | 27 | ||
28 | class InstallData | 28 | class InstallData |
29 | { | 29 | { |
30 | public: | 30 | public: |
31 | QString option; // I - install, D - delete, U - upgrade | 31 | QString option; // I - install, D - delete, R- reinstall U - upgrade |
32 | QString packageName; | 32 | QString packageName; |
33 | Destination *destination; | 33 | Destination *destination; |
34 | bool recreateLinks; | 34 | bool recreateLinks; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | class InstallDlgImpl : public InstallDlg | 37 | class InstallDlgImpl : public InstallDlg |
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 | |||
@@ -60,18 +60,16 @@ bool Ipkg :: runIpkg( ) | |||
60 | if ( runtimeDir != "" ) | 60 | if ( runtimeDir != "" ) |
61 | { | 61 | { |
62 | cmd += "cd "; | 62 | cmd += "cd "; |
63 | cmd += runtimeDir; | 63 | cmd += runtimeDir; |
64 | cmd += " ; "; | 64 | cmd += " ; "; |
65 | } | 65 | } |
66 | cmd += "ipkg"; | 66 | cmd += "ipkg -force-defaults"; |
67 | 67 | if ( option != "update" && option != "download" ) | |
68 | if ( option != "update" && option != "download" && option != "upgrade" ) | ||
69 | { | 68 | { |
70 | cmd += " -dest "+ destination; | 69 | cmd += " -dest "+ destination; |
71 | cmd += " -force-defaults"; | ||
72 | 70 | ||
73 | if ( flags & FORCE_DEPENDS ) | 71 | if ( flags & FORCE_DEPENDS ) |
74 | cmd += " -force-depends"; | 72 | cmd += " -force-depends"; |
75 | if ( flags & FORCE_REINSTALL ) | 73 | if ( flags & FORCE_REINSTALL ) |
76 | cmd += " -force-reinstall"; | 74 | cmd += " -force-reinstall"; |
77 | if ( flags & FORCE_REMOVE ) | 75 | if ( flags & FORCE_REMOVE ) |
@@ -98,13 +96,13 @@ bool Ipkg :: runIpkg( ) | |||
98 | 96 | ||
99 | 97 | ||
100 | if ( option == "reinstall" ) | 98 | if ( option == "reinstall" ) |
101 | cmd += " install"; | 99 | cmd += " install"; |
102 | else | 100 | else |
103 | cmd += " " + option; | 101 | cmd += " " + option; |
104 | if ( option != "upgrade" ) | 102 | if ( package != "" ) |
105 | cmd += " " + package; | 103 | cmd += " " + package; |
106 | cmd += " 2>&1"; | 104 | cmd += " 2>&1"; |
107 | 105 | ||
108 | 106 | ||
109 | if ( package != "" ) | 107 | if ( package != "" ) |
110 | emit outputText( QString( "Dealing with package " ) + package ); | 108 | emit outputText( QString( "Dealing with package " ) + 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 | |||
@@ -556,13 +556,17 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) | |||
556 | } | 556 | } |
557 | 557 | ||
558 | // Check if we are reinstalling the same version | 558 | // Check if we are reinstalling the same version |
559 | if ( p->getVersion() != p->getInstalledVersion() ) | 559 | if ( p->getVersion() != p->getInstalledVersion() ) |
560 | item.recreateLinks = true; | 560 | item.recreateLinks = true; |
561 | else | 561 | else |
562 | { | ||
563 | if ( item.option == "U" ) | ||
564 | item.option = "R"; | ||
562 | item.recreateLinks = false; | 565 | item.recreateLinks = false; |
566 | } | ||
563 | 567 | ||
564 | // User hit cancel (on dlg - assume remove) | 568 | // User hit cancel (on dlg - assume remove) |
565 | return item; | 569 | return item; |
566 | } | 570 | } |
567 | } | 571 | } |
568 | 572 | ||