summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/oipkg.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/packagemanager/oipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/oipkg.cpp17
1 files changed, 15 insertions, 2 deletions
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
@@ -148,17 +148,24 @@ void OIpkg::setConfigItems( OConfItemList *configList )
if ( item->type() != OConfItem::NotDefined )
{
QString confLine;
if ( !item->active() )
confLine = "#";
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;
default : break;
};
confStream << confLine << " " << item->name() << " " << item->value() << "\n";
}
@@ -503,18 +510,24 @@ void OIpkg::loadConfiguration()
line.startsWith( "#arch" ) ||
line.startsWith( "#option" ) )
{
int pos = line.find( ' ', 1 );
// 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" )
type = OConfItem::Option;
else if ( typeStr == "arch" || typeStr == "#arch" )
type = OConfItem::Arch;
else
type = OConfItem::NotDefined;
@@ -528,17 +541,17 @@ void OIpkg::loadConfiguration()
QString value = "";
if ( endpos > -1 )
value = line.right( line.length() - endpos - 1 );
// Active
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 ) );
}
}
}
f.close();
}
}