-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index 7f724af..b9ce227 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp @@ -90,75 +90,80 @@ void DataManager :: loadServers() { char alias[20]; char url[100]; sscanf( lineStr, "%*[^ ] %s %s", alias, url ); Server s( alias, url ); serverList.push_back( s ); if ( lineStr.startsWith( "src" ) ) setActiveServer( alias ); } else if ( lineStr.startsWith( "dest" ) ) { char alias[20]; char path[50]; sscanf( lineStr, "%*[^ ] %s %s", alias, path ); Destination d( alias, path ); destList.push_back( d ); } } } fclose( fp ); // 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; for ( it = serverList.begin() ; it != serverList.end() ; ++it ) reloadServerData( it->getServerName() ); } void DataManager :: reloadServerData( const char *serverName ) { Server *s = getServer( serverName ); // Now we've read the config file in we need to read the servers // The local server is a special case. This holds the contents of the // status files the number of which depends on how many destinations // we've set up // The other servers files hold the contents of the server package list if ( s->getServerName() == LOCAL_SERVER ) s->readStatusFile( destList ); else if ( s->getServerName() == LOCAL_IPKGS ) s->readLocalIpks( getServer( LOCAL_SERVER ) ); else s->readPackageFile( getServer( LOCAL_SERVER ) ); } void DataManager :: writeOutIpkgConf() { |