summaryrefslogtreecommitdiff
authortille <tille>2002-07-15 16:03:13 (UTC)
committer tille <tille>2002-07-15 16:03:13 (UTC)
commitdcea0e50a00ed9efb988ded5abf5d39de1bea393 (patch) (side-by-side diff)
treea0deba1e0a736c8ae6bae5dcd73b457ed27962d8
parentecf2a873be3274bb30be0c659b7db6ef8a43be84 (diff)
downloadopie-dcea0e50a00ed9efb988ded5abf5d39de1bea393.zip
opie-dcea0e50a00ed9efb988ded5abf5d39de1bea393.tar.gz
opie-dcea0e50a00ed9efb988ded5abf5d39de1bea393.tar.bz2
oipkg works with ipkg 0.99.20
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/opie-oipkg.control2
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp8
-rw-r--r--noncore/unsupported/oipkg/pmipkg.h1
3 files changed, 2 insertions, 9 deletions
diff --git a/noncore/unsupported/oipkg/opie-oipkg.control b/noncore/unsupported/oipkg/opie-oipkg.control
index 1cff44e..ff1c6ca 100644
--- a/noncore/unsupported/oipkg/opie-oipkg.control
+++ b/noncore/unsupported/oipkg/opie-oipkg.control
@@ -1,9 +1,9 @@
Files: bin/oipkg apps/Settings/oipkg.desktop pics/oipkg/*
Priority: optional
Section: opie/settings
Maintainer: Patrick S. Vogt <tille@almana.ch>
Architecture: arm
Version: $QPE_VERSION-$SUB_VERSION
-Depends: opie-base ($QPE_VERSION), ipkg (>0.9)
+Depends: opie-base ($QPE_VERSION), ipkg (>0.99.20)
Description: Opie Projects advanced gui ipkg installer
A GUI front-end to ipkg for the Opie environment.
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 71e9b88..2ed86ee 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -18,49 +18,49 @@
#include <qpe/stringutil.h>
#include <qpe/qpeapplication.h>
#include <qdir.h>
#include <qfile.h>
#include <qgroupbox.h>
#include <qmultilineedit.h>
#include <qstring.h>
#include <qcheckbox.h>
#include <qtextstream.h>
#include <qtextview.h>
#include <qmessagebox.h>
#include <qprogressbar.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <stdlib.h>
#include <unistd.h>
#include "mainwindow.h"
//#define OPROCESS
PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f )
- : QObject ( p ), shellWarning(true)
+ : QObject ( p )
{
settings = s;
runwindow = new RunWindow( p, name, true, f );
#ifdef OPROCESS
ipkgProcess = new OProcess();
connect ( ipkgProcess, SIGNAL(receivedStdout(OProcess*,char*,int)),
this, SLOT(getIpkgOutput(OProcess*,char*,int)));
connect ( ipkgProcess, SIGNAL(receivedStderr(OProcess*,char*,int)),
this, SLOT(getIpkgOutput(OProcess*,char*,int)));
installDialog = 0;
#endif
}
PmIpkg::~PmIpkg()
{
#ifdef OPROCESS
delete ipkgProcess;
#endif
}
bool PmIpkg::runIpkg(const QString& args, const QString& dest )
{
bool ret=false;
@@ -135,54 +135,48 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
FILE *fp;
char line[130];
QString lineStr, lineStrOld;
sleep(1);
cmd +=" 2>&1";
fp = popen( (const char *) cmd, "r");
if ( fp == NULL ) {
qDebug("Could not execute '" + cmd + "'! err=%d", fp);
out("\nError while executing "+ cmd+"\n\n");
ret = false;
} else {
while ( fgets( line, sizeof line, fp) != NULL)
{
lineStr = line;
lineStr=lineStr.left(lineStr.length()-1);
//Configuring opie-oipkg...Done
if (lineStr.contains("Done")) ret = true;
if (lineStr!=lineStrOld)
out(lineStr);
lineStrOld = lineStr;
qApp->processEvents();
}
}
pclose(fp);
- if (!ret && shellWarning)
- {
- shellWarning = false;
- QMessageBox::critical( runwindow, tr("install failure"),
- tr("<p>Did you start me from the command line?</p>"));
- }
#endif
//out( "Finished!");
pvDebug(2,QString(ret?"success\n":"failure\n"));
return ret;
}
void PmIpkg::makeLinks(Package *pack)
{
pvDebug( 2, "PmIpkg::makeLinks "+ pack->name());
QString pn = pack->name();
linkPackage( pack->packageName(), pack->dest() );
}
QStringList* PmIpkg::getList( QString packFileName, QString d )
{
QString dest = settings->getDestinationUrlByName( d );
dest = dest==""?d:dest;
// if (dest == "/" ) return 0;
{
Config cfg( "oipkg", Config::User );
cfg.setGroup( "Common" );
QString statusDir = cfg.readEntry( "statusDir", "" );
}
QString packFileDir = dest+"/"+statusDir+"/info/"+packFileName+".list";
diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h
index 662800a..c84acfa 100644
--- a/noncore/unsupported/oipkg/pmipkg.h
+++ b/noncore/unsupported/oipkg/pmipkg.h
@@ -32,43 +32,42 @@ class PmIpkg : public QObject
public:
PmIpkg( PackageManagerSettings* , QWidget* p=0, const char * name=0, WFlags f=0 );
~PmIpkg();
int linkOpp;
void loadList( PackageList* );
void commit();
void update();
void show();
void clearLists();
public slots:
void doIt();
void install();
void remove();
void installFile(const QString &fileName, const QString &dest="");
void removeFile(const QString &fileName, const QString &dest="");
void createLinks( const QString &dest );
void removeLinks( const QString &dest );
//private slots:
void getIpkgOutput(OProcess *proc, char *buffer, int buflen);
private:
- bool shellWarning;
OProcess *ipkgProcess;
PackageManagerSettings* settings;
RunWindow *runwindow;
InstallDialog *installDialog;
QList<Package> to_remove;
QList<Package> to_install;
void makeLinks(Package*);
void linkPackage( QString, QString );
void processLinkDir( QString , QString );
bool runIpkg(const QString& args, const QString& dest="" );
void out( QString );
QStringList* getList( QString, QString );
void processFileList( QStringList*, QString );
};
#endif