author | tille <tille> | 2002-06-28 17:01:13 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-28 17:01:13 (UTC) |
commit | 8176526fc61f4b4012021a4324aee592463dbb3a (patch) (side-by-side diff) | |
tree | 928ffd2ce9c00df7d763e1e34b0f137192975c09 | |
parent | 986a23a683f53ab612be03b56dd9bc7c1aeb3651 (diff) | |
download | opie-8176526fc61f4b4012021a4324aee592463dbb3a.zip opie-8176526fc61f4b4012021a4324aee592463dbb3a.tar.gz opie-8176526fc61f4b4012021a4324aee592463dbb3a.tar.bz2 |
setpgid(0,0); thanks to sandman
-rw-r--r-- | noncore/unsupported/oipkg/main.cpp | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/package.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/noncore/unsupported/oipkg/main.cpp b/noncore/unsupported/oipkg/main.cpp index f72540c..c579df8 100644 --- a/noncore/unsupported/oipkg/main.cpp +++ b/noncore/unsupported/oipkg/main.cpp @@ -1,25 +1,26 @@ #include "mainwindow.h" #include <qpe/qpeapplication.h> #include <qstring.h> //#include <qmessagebox.h> int debugLevel; int main( int argc, char ** argv ) { + setpgid(0,0); printf("This is oipkg\n"); printf("$Id$\n"); debugLevel = 2; if (argc > 1) { debugLevel = QString ( argv[1] ).toInt(); qDebug("setting debug level to %i",debugLevel); } QPEApplication a( argc, argv ); MainWindow mw; // if (argc > 2) // QMessageBox::information( &mw, "oipkg","While ipkg is working\noipkg is hanging.\nPlease be patient!"); a.showMainDocumentWidget( &mw ); return a.exec(); } diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp index 8bbdd77..0cd93bf 100644 --- a/noncore/unsupported/oipkg/package.cpp +++ b/noncore/unsupported/oipkg/package.cpp @@ -1,165 +1,167 @@ #include "package.h" #include <qpe/process.h> #include <qpe/stringutil.h> #include <qfile.h> #include <qtextstream.h> #include <stdlib.h> #include <unistd.h> #include "debug.h" Package::Package( QObject *parent, const char *name ) : QObject(parent,name) { } Package::~Package() { } Package::Package( PackageManagerSettings *s, QObject *parent, const char *name ) : QObject(parent,name) { Package(parent,name); init(s); } void Package::init( PackageManagerSettings *s ) { settings = s; _size = ""; _section = ""; _subsection = ""; _shortDesc = ""; _desc = ""; _name = ""; _toProcess = false; _useFileName = false; _old = false; _status = ""; _dest = settings->getDestinationName(); _link = settings->createLinks(); _versions=0; _version=""; } Package::Package( QStringList pack, PackageManagerSettings *s , QObject *parent, const char *name ) : QObject(parent,name) { init(s); parsePackage( pack ); } Package::Package( QString n, PackageManagerSettings *s, QObject *parent, const char *name ) + : QObject(parent,name) { init(s); if ( !QFile::exists( n ) ) { _name = QString( n ); }else{ pvDebug(4,"remote file: "+n); parseIpkgFile( n ); _useFileName = true; _fileName = QString( n ); } } Package::Package( Package *pi, QObject *parent, const char *name ) + : QObject(parent,name) { init(pi->settings); copyValues( pi ); } void Package::setValue( QString n, QString t ) { if ( n == "Package" ) { _name = QString( t ); }else if ( n == "Installed-Size" ) { _size = t; // }else if ( n == "Priority") // { }else if ( n == "Section") { setSection( t ); // }else if ( n == "Maintainer") // { // // }else if ( n == "Architecture") // { }else if ( n == "Version") { _version = t; // }else if ( n == "Pre-Depends") // { // // }else if ( n == "Depends") // { }else if ( n == "Filename") { _fileName = t; // }else if ( n == "Size") // { // // }else if ( n == "MD5Sum") // { }else if ( n == "Description") { setDesc( t ); }else if ( n == "Status") { if ( installed() ) return; _status = t; // }else if ( n == "Essential") // { }else{ _values.insert(n,new QString(t)); } } QString Package::name() { if (_displayName.isEmpty() ) return _name; else return _displayName; } QString Package::installName() { if (_useFileName) return _fileName; else return _name; } QString Package::packageName() { QString pn = installName(); pn = pn.right(pn.length()-pn.findRev("/")); pn = pn.left(pn.find("_")); return pn; } bool Package::installed() { if (_status.contains("installed")) { if (_status.contains("not-installed")) { _toProcess = true; return false; } else return true; } else if (_versions) { QDictIterator<Package> other( *_versions ); while ( other.current() ) |