summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/oipkg.cpp
Unidiff
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
@@ -150,13 +150,20 @@ void OIpkg::setConfigItems( OConfItemList *configList )
150 QString confLine; 150 QString confLine;
151 if ( !item->active() ) 151 if ( !item->active() )
152 confLine = "#"; 152 confLine = "#";
153 153
154 switch ( item->type() ) 154 switch ( item->type() )
155 { 155 {
156 case OConfItem::Source : confLine.append( "src " ); break; 156 case OConfItem::Source :
157 {
158 if ( item->features().contains( "Compressed" ) )
159 confLine.append( "src/gz " );
160 else
161 confLine.append( "src " );
162 }
163 break;
157 case OConfItem::Destination : confLine.append( "dest " ); break; 164 case OConfItem::Destination : confLine.append( "dest " ); break;
158 case OConfItem::Option : confLine.append( "option " ); break; 165 case OConfItem::Option : confLine.append( "option " ); break;
159 case OConfItem::Arch : confLine.append( "arch " ); break; 166 case OConfItem::Arch : confLine.append( "arch " ); break;
160 default : break; 167 default : break;
161 }; 168 };
162 169
@@ -505,14 +512,20 @@ void OIpkg::loadConfiguration()
505 { 512 {
506 int pos = line.find( ' ', 1 ); 513 int pos = line.find( ' ', 1 );
507 514
508 // Type 515 // Type
509 QString typeStr = line.left( pos ); 516 QString typeStr = line.left( pos );
510 OConfItem::Type type; 517 OConfItem::Type type;
518 QString features;
511 if ( typeStr == "src" || typeStr == "#src" ) 519 if ( typeStr == "src" || typeStr == "#src" )
512 type = OConfItem::Source; 520 type = OConfItem::Source;
521 else if ( typeStr == "src/gz" || typeStr == "#src/gz" )
522 {
523 type = OConfItem::Source;
524 features = "Compressed";
525 }
513 else if ( typeStr == "dest" || typeStr == "#dest" ) 526 else if ( typeStr == "dest" || typeStr == "#dest" )
514 type = OConfItem::Destination; 527 type = OConfItem::Destination;
515 else if ( typeStr == "option" || typeStr == "#option" ) 528 else if ( typeStr == "option" || typeStr == "#option" )
516 type = OConfItem::Option; 529 type = OConfItem::Option;
517 else if ( typeStr == "arch" || typeStr == "#arch" ) 530 else if ( typeStr == "arch" || typeStr == "#arch" )
518 type = OConfItem::Arch; 531 type = OConfItem::Arch;
@@ -530,13 +543,13 @@ void OIpkg::loadConfiguration()
530 value = line.right( line.length() - endpos - 1 ); 543 value = line.right( line.length() - endpos - 1 );
531 544
532 // Active 545 // Active
533 bool active = !line.startsWith( "#" ); 546 bool active = !line.startsWith( "#" );
534 547
535 // Add to list 548 // Add to list
536 m_confInfo->append( new OConfItem( type, name, value, active ) ); 549 m_confInfo->append( new OConfItem( type, name, value, features, active ) );
537 } 550 }
538 } 551 }
539 } 552 }
540 553
541 f.close(); 554 f.close();
542 } 555 }