Diffstat (limited to 'noncore/settings/aqpkg/datamgr.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index bb86766..7c49621 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp @@ -88,3 +88,3 @@ void DataManager :: loadServers() lineStr = line; - if ( lineStr.startsWith( "src" ) || lineStr.startsWith( "#src" ) || lineStr.startsWith( "# src" ) ) + if ( lineStr.startsWith( "src" ) ) //|| lineStr.startsWith( "#src" ) || lineStr.startsWith( "# src" ) ) { @@ -100,6 +100,9 @@ void DataManager :: loadServers() Server s( alias, url ); + if ( lineStr.startsWith( "src" ) ) + s.setActive( true ); + else + s.setActive( false ); + serverList.push_back( s ); - if ( lineStr.startsWith( "src" ) ) - setActiveServer( alias ); } @@ -117,36 +120,2 @@ void DataManager :: loadServers() - // Go through the server destination list and add root, cf and card if they - // don't already exist -/* AQ - commented out as if you don't have a CF or SD card in then - * this causes IPKG to try to create directories on non existant devices - * (which of course fails), gives a nasty error message and can cause ipkg - * to seg fault. - * - vector<Destination>::iterator dit; - bool foundRoot = false; - bool foundCF = false; - bool foundCard = false; - for ( dit = destList.begin() ; dit != destList.end() ; ++dit ) - { - if ( dit->getDestinationPath() == "/" ) - foundRoot = true; - if ( dit->getDestinationPath() == "/mnt/cf" ) - foundCF = true; - if ( dit->getDestinationPath() == "/mnt/card" ) - foundCard = true; - } - - // If running on a Zaurus (arm) then if we didn't find root, CF or card - // destinations, add them as default -#ifdef QWS -#ifndef X86 - if ( !foundRoot ) - destList.push_back( Destination( "root", "/" ) ); - if ( !foundCF ) - destList.push_back( Destination( "cf", "/mnt/cf" ) ); - if ( !foundCF ) - destList.push_back( Destination( "card", "/mnt/card" ) ); -#endif -#endif -*/ vector<Server>::iterator it; @@ -203,3 +172,3 @@ void DataManager :: writeOutIpkgConf() - if ( !activeServer || alias != activeServer ) + if ( !it->isServerActive() ) out << "#"; |