From 769f2a09ccfcc639a87600ecb046e9140fe2f691 Mon Sep 17 00:00:00 2001 From: drw Date: Tue, 21 Dec 2004 00:37:22 +0000 Subject: Preliminary support for src/gz feeds, it works if you manually update ipkg.conf. Still need to add configuration option on server config dialog tab. --- (limited to 'noncore/settings/packagemanager/oipkg.cpp') diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp index b0cc94d..a66bd51 100644 --- a/noncore/settings/packagemanager/oipkg.cpp +++ b/noncore/settings/packagemanager/oipkg.cpp @@ -153,7 +153,14 @@ void OIpkg::setConfigItems( OConfItemList *configList ) switch ( item->type() ) { - case OConfItem::Source : confLine.append( "src " ); break; + case OConfItem::Source : + { + if ( item->features().contains( "Compressed" ) ) + confLine.append( "src/gz " ); + else + confLine.append( "src " ); + } + break; case OConfItem::Destination : confLine.append( "dest " ); break; case OConfItem::Option : confLine.append( "option " ); break; case OConfItem::Arch : confLine.append( "arch " ); break; @@ -508,8 +515,14 @@ void OIpkg::loadConfiguration() // Type QString typeStr = line.left( pos ); OConfItem::Type type; + QString features; if ( typeStr == "src" || typeStr == "#src" ) type = OConfItem::Source; + else if ( typeStr == "src/gz" || typeStr == "#src/gz" ) + { + type = OConfItem::Source; + features = "Compressed"; + } else if ( typeStr == "dest" || typeStr == "#dest" ) type = OConfItem::Destination; else if ( typeStr == "option" || typeStr == "#option" ) @@ -533,7 +546,7 @@ void OIpkg::loadConfiguration() bool active = !line.startsWith( "#" ); // Add to list - m_confInfo->append( new OConfItem( type, name, value, active ) ); + m_confInfo->append( new OConfItem( type, name, value, features, active ) ); } } } -- cgit v0.9.0.2