summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/package.cpp2
-rw-r--r--noncore/unsupported/oipkg/pksettings.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp
index 1054a1d..3effb73 100644
--- a/noncore/unsupported/oipkg/package.cpp
+++ b/noncore/unsupported/oipkg/package.cpp
@@ -383,49 +383,49 @@ void Package::setDest( QString d )
383 else _dest = d; 383 else _dest = d;
384} 384}
385 385
386void Package::setOn() 386void Package::setOn()
387{ 387{
388 _toProcess = true; 388 _toProcess = true;
389} 389}
390 390
391bool Package::link() 391bool Package::link()
392{ 392{
393 if ( _dest == "root" || (!installed() && !_toProcess) ) return false; 393 if ( _dest == "root" || (!installed() && !_toProcess) ) return false;
394 return _link; 394 return _link;
395} 395}
396 396
397void Package::setLink(bool b) 397void Package::setLink(bool b)
398{ 398{
399 _link = b; 399 _link = b;
400} 400}
401 401
402void Package::parseIpkgFile( QString file) 402void Package::parseIpkgFile( QString file)
403{ 403{
404// 20020830 404// 20020830
405// a quick hack to make oipkg understand the new ipk format 405// a quick hack to make oipkg understand the new ipk format
406// neu: ar pf PACKAGE control.tar.gz | tar xfOz - ./control > /tmp/control 406// neu: ar pf PACKAGE control.tar.gz | tar xfOz - ./control > /tmp/control
407 if (! system("ar pf "+file+" control.tar.gz | tar xfOz - ./control > /tmp/control") ) 407 if (system("ar pf "+file+" control.tar.gz | tar xfOz - ./control > /tmp/control") != 0)
408 { 408 {
409//#old tar ipk format 409//#old tar ipk format
410 system("tar xzf "+file+" -C /tmp"); 410 system("tar xzf "+file+" -C /tmp");
411 system("tar xzf /tmp/control.tar.gz -C /tmp"); 411 system("tar xzf /tmp/control.tar.gz -C /tmp");
412 } 412 }
413 QFile f("/tmp/control"); 413 QFile f("/tmp/control");
414 if ( f.open(IO_ReadOnly) ) 414 if ( f.open(IO_ReadOnly) )
415 { 415 {
416 QTextStream t( &f ); 416 QTextStream t( &f );
417 QStringList pack; 417 QStringList pack;
418 while ( !t.eof() ) 418 while ( !t.eof() )
419 { 419 {
420 pack << t.readLine(); 420 pack << t.readLine();
421 } 421 }
422 f.close(); 422 f.close();
423 parsePackage( pack ); 423 parsePackage( pack );
424 } 424 }
425 425
426} 426}
427 427
428//QString Package::getPackageName() 428//QString Package::getPackageName()
429//{ 429//{
430 //if ( _packageName.isEmpty() ) return _name; 430 //if ( _packageName.isEmpty() ) return _name;
431 //else return _packageName; 431 //else return _packageName;
diff --git a/noncore/unsupported/oipkg/pksettings.cpp b/noncore/unsupported/oipkg/pksettings.cpp
index acabaed..063b018 100644
--- a/noncore/unsupported/oipkg/pksettings.cpp
+++ b/noncore/unsupported/oipkg/pksettings.cpp
@@ -206,54 +206,53 @@ void PackageManagerSettings::destNameChanged(const QString& t)
206 activeDestination->changeItem( t, editeddestination ); 206 activeDestination->changeItem( t, editeddestination );
207 activeLinkDestination->changeItem( t, editeddestination ); 207 activeLinkDestination->changeItem( t, editeddestination );
208 connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); 208 connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) );
209 changed = true; 209 changed = true;
210} 210}
211 211
212void PackageManagerSettings::serverUrlChanged(const QString& t) 212void PackageManagerSettings::serverUrlChanged(const QString& t)
213{ 213{
214 serverurlDic.replace(editedserver, new QString(t)); 214 serverurlDic.replace(editedserver, new QString(t));
215 changed = true; 215 changed = true;
216 serverChanged = true; 216 serverChanged = true;
217} 217}
218 218
219void PackageManagerSettings::destUrlChanged(const QString& t) 219void PackageManagerSettings::destUrlChanged(const QString& t)
220{ 220{
221 destinationurlDic.replace(editeddestination, new QString(t)); 221 destinationurlDic.replace(editeddestination, new QString(t));
222 changed = true; 222 changed = true;
223} 223}
224 224
225void PackageManagerSettings::writeIpkgConfig(const QString& conffile) 225void PackageManagerSettings::writeIpkgConfig(const QString& conffile)
226{ 226{
227 QFile conf(conffile); 227 QFile conf(conffile);
228 if ( ! conf.open(IO_WriteOnly) ) return; 228 if ( ! conf.open(IO_WriteOnly) ) return;
229 QTextStream s(&conf); 229 QTextStream s(&conf);
230 s << "# Written by qpie Package Manager\n"; 230 s << "# Written by oipkg -- the opie package manager\n";
231 for (int i=0; i<(int)activeServers->count(); i++) 231 for (int i=0; i<(int)activeServers->count(); i++)
232 { 232 {
233 QString url = serverurlDic[i] ? *serverurlDic[i] : QString("???"); 233 QString url = serverurlDic[i] ? *serverurlDic[i] : QString("???");
234 if ( !activeServers->isSelected(i) ) 234 if ( !activeServers->isSelected(i) ) s << "#";
235 s << "#";
236 s << "src " << activeServers->text(i) << " " << url << "\n"; 235 s << "src " << activeServers->text(i) << " " << url << "\n";
237 } 236 }
238 for (int i=0; i<(int)destinations->count(); i++) 237 for (int i=0; i<(int)destinations->count(); i++)
239 { 238 {
240 QString url = destinationurlDic[i] ? *destinationurlDic[i] : QString("???"); 239 QString url = destinationurlDic[i] ? *destinationurlDic[i] : QString("???");
241 s << "dest " << destinations->text(i) << " " << url << "\n"; 240 s << "dest " << destinations->text(i) << " " << url << "\n";
242 } 241 }
243 conf.close(); 242 conf.close();
244} 243}
245 244
246 245
247void PackageManagerSettings::readInstallationSettings() 246void PackageManagerSettings::readInstallationSettings()
248{ 247{
249 Config cfg( "oipkg", Config::User ); 248 Config cfg( "oipkg", Config::User );
250 cfg.setGroup( "Settings" ); 249 cfg.setGroup( "Settings" );
251 250
252 installationSettingsCount = cfg.readNumEntry( "count", -1 ); 251 installationSettingsCount = cfg.readNumEntry( "count", -1 );
253 currentSetting = cfg.readNumEntry( "current", 0 );// o should be -1 252 currentSetting = cfg.readNumEntry( "current", 0 );// o should be -1
254 253
255// for (int i = 0; i < installationSettingsCount; i++) 254// for (int i = 0; i < installationSettingsCount; i++)
256// { 255// {
257// cfg.setGroup( "Setting_" + QString::number(i) ); 256// cfg.setGroup( "Setting_" + QString::number(i) );
258// settingName->insertItem( cfg.readEntry( "name", "???" ), i ); 257// settingName->insertItem( cfg.readEntry( "name", "???" ), i );
259// }; 258// };