-rw-r--r-- | noncore/unsupported/oipkg/TODO | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 36 |
2 files changed, 33 insertions, 4 deletions
diff --git a/noncore/unsupported/oipkg/TODO b/noncore/unsupported/oipkg/TODO index d81e873..c53ca93 100644 --- a/noncore/unsupported/oipkg/TODO +++ b/noncore/unsupported/oipkg/TODO @@ -8,2 +8,3 @@ * install to dest with click on packet +* qcop * error handling diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 681f2d4..94ca824 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp @@ -9,2 +9,3 @@ #include <qpe/resource.h> +#include <qpe/config.h> #include <qpe/stringutil.h> @@ -25,2 +26,5 @@ +#define PARSE_FILELIST +// #define IPKG_FILELIST + PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) @@ -54,3 +58,3 @@ int PmIpkg::runIpkg(const QString& args) - out( "Starting to "+ args+"<br>\n"); + out( "<hr><br>Starting to "+ args+"<br>\n"); cmd += args; @@ -68,2 +72,3 @@ int PmIpkg::runIpkg(const QString& args) cmd += " | tee "+redirect+" 2>&1"; + pvDebug(2, "running >"+cmd+"<"); r = system(cmd.latin1()); @@ -87,10 +92,26 @@ int PmIpkg::runIpkg(const QString& args) -void PmIpkg::makeLinks(QString file) +void PmIpkg::makeLinks(QString pack) { + pvDebug( 2, "PmIpkg::makeLinks "+ pack); out( "<br>creating links<br>" ); QString dest = settings->getDestinationUrl(); - out("for package "+file+" in "+dest+"<br>"); - system(("ipkg -d "+dest+" files "+file+"> /tmp/oipkg.pipe 2>&1").latin1()); + out("for package "+pack+" in "+dest+"<br>"); +#ifdef IPKG_FILELIST + system(("ipkg -d "+dest+" files "+pack+"> /tmp/oipkg.pipe 2>&1").latin1()); QFile f( "/tmp/oipkg.pipe" ); while ( ! f.open(IO_ReadOnly) ) {}; +#endif +#ifdef PARSE_FILELIST + { + Config cfg( "oipkg", Config::User ); + cfg.setGroup( "Common" ); + QString statusDir = cfg.readEntry( "statusDir", "" ); + } + QString fn = dest+"/"+statusDir+"/info/"+pack+".list"; + QFile f( fn ); + if ( ! f.open(IO_ReadOnly) ) + { + out( "<b>Panik!</b> Could not open:<br>"+fn ); + }; +#endif QTextStream t( &f ); @@ -107,3 +128,10 @@ void PmIpkg::processLinkDir( QString file, QString dest ) { + +#ifdef PARSE_FILELIST + QString destFile = file; + file = dest+"/"+file; +#endif +#ifdef IPKG_FILELIST QString destFile = file.right( file.length() - dest.length() ); +#endif QFileInfo fileInfo( file ); |