Diffstat (limited to 'noncore/settings/aqpkg/datamgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index 3933a22..0159a79 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp | |||
@@ -205,71 +205,71 @@ void DataManager :: writeOutIpkgConf() | |||
205 | // Write out servers | 205 | // Write out servers |
206 | vector<Server>::iterator it = serverList.begin(); | 206 | vector<Server>::iterator it = serverList.begin(); |
207 | while ( it != serverList.end() ) | 207 | while ( it != serverList.end() ) |
208 | { | 208 | { |
209 | QString alias = it->getServerName(); | 209 | QString alias = it->getServerName(); |
210 | // Don't write out local as its a dummy | 210 | // Don't write out local as its a dummy |
211 | if ( alias != LOCAL_SERVER && alias != LOCAL_IPKGS ) | 211 | if ( alias != LOCAL_SERVER && alias != LOCAL_IPKGS ) |
212 | { | 212 | { |
213 | QString url = it->getServerUrl();; | 213 | QString url = it->getServerUrl();; |
214 | 214 | ||
215 | if ( !it->isServerActive() ) | 215 | if ( !it->isServerActive() ) |
216 | out << "#"; | 216 | out << "#"; |
217 | out << "src " << alias << " " << url << endl; | 217 | out << "src " << alias << " " << url << endl; |
218 | } | 218 | } |
219 | 219 | ||
220 | it++; | 220 | it++; |
221 | } | 221 | } |
222 | 222 | ||
223 | out << endl; | 223 | out << endl; |
224 | 224 | ||
225 | // Write out destinations | 225 | // Write out destinations |
226 | vector<Destination>::iterator it2 = destList.begin(); | 226 | vector<Destination>::iterator it2 = destList.begin(); |
227 | while ( it2 != destList.end() ) | 227 | while ( it2 != destList.end() ) |
228 | { | 228 | { |
229 | out << "dest " << it2->getDestinationName() << " " << it2->getDestinationPath() << endl; | 229 | out << "dest " << it2->getDestinationName() << " " << it2->getDestinationPath() << endl; |
230 | it2++; | 230 | it2++; |
231 | } | 231 | } |
232 | 232 | ||
233 | out << endl; | 233 | out << endl; |
234 | out << "# Proxy Support" << endl; | 234 | out << "# Proxy Support" << endl; |
235 | 235 | ||
236 | if ( !httpProxyEnabled && httpProxy == "" ) | 236 | if ( !httpProxyEnabled && httpProxy == "" ) |
237 | out << "#option http_proxy http://proxy.tld:3128" << endl; | 237 | out << "#option http_proxy http://proxy.tld:3128" << endl; |
238 | else | 238 | else |
239 | { | 239 | { |
240 | if ( !httpProxyEnabled ) | 240 | if ( !httpProxyEnabled ) |
241 | out << "#"; | 241 | out << "#"; |
242 | out << "option http_proxy " << httpProxy << endl; | 242 | out << "option http_proxy " << httpProxy << endl; |
243 | } | 243 | } |
244 | 244 | ||
245 | if ( !ftpProxyEnabled && ftpProxy == "" ) | 245 | if ( !ftpProxyEnabled && ftpProxy == "" ) |
246 | out << "#option ftp_proxy http://proxy.tld:3128" << endl; | 246 | out << "#option ftp_proxy http://proxy.tld:3128" << endl; |
247 | else | 247 | else |
248 | { | 248 | { |
249 | if ( !ftpProxyEnabled ) | 249 | if ( !ftpProxyEnabled ) |
250 | out << "#"; | 250 | out << "#"; |
251 | out << "option ftp_proxy " << ftpProxy << endl; | 251 | out << "option ftp_proxy " << ftpProxy << endl; |
252 | } | 252 | } |
253 | if ( proxyUsername == "" ) | 253 | if ( proxyUsername == "" || (!httpProxyEnabled && !ftpProxyEnabled) ) |
254 | out << "#option proxy_username <username>" << endl; | 254 | out << "#option proxy_username <username>" << endl; |
255 | else | 255 | else |
256 | out << "option proxy_username " << proxyUsername << endl; | 256 | out << "option proxy_username " << proxyUsername << endl; |
257 | if ( proxyPassword == "" ) | 257 | if ( proxyPassword == "" || (!httpProxyEnabled && !ftpProxyEnabled) ) |
258 | out << "#option proxy_password <password>" << endl << endl; | 258 | out << "#option proxy_password <password>" << endl << endl; |
259 | else | 259 | else |
260 | out << "option proxy_password " << proxyPassword << endl<< endl; | 260 | out << "option proxy_password " << proxyPassword << endl<< endl; |
261 | 261 | ||
262 | out << "# Offline mode (for use in constructing flash images offline)" << endl; | 262 | out << "# Offline mode (for use in constructing flash images offline)" << endl; |
263 | out << "#option offline_root target" << endl; | 263 | out << "#option offline_root target" << endl; |
264 | 264 | ||
265 | 265 | ||
266 | out.close(); | 266 | out.close(); |
267 | } | 267 | } |
268 | 268 | ||
269 | 269 | ||
270 | void DataManager :: setAvailableCategories( QString section ) | 270 | void DataManager :: setAvailableCategories( QString section ) |
271 | { | 271 | { |
272 | section = section.lower(); | 272 | section = section.lower(); |
273 | if ( availableCategories.find( "#" + section + "#" ) == -1 ) | 273 | if ( availableCategories.find( "#" + section + "#" ) == -1 ) |
274 | availableCategories += section + "#"; | 274 | availableCategories += section + "#"; |
275 | } | 275 | } |