summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/pmipkg.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/oipkg/pmipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp37
1 files changed, 25 insertions, 12 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 0817247..7d0e246 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -5,5 +5,3 @@
5 5
6//#infdef OPROCESS
7#include <opie/oprocess.h> 6#include <opie/oprocess.h>
8//#endif
9#include <qpe/resource.h> 7#include <qpe/resource.h>
@@ -31,2 +29,4 @@
31 29
30//#define OPROCESS
31
32PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) 32PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f )
@@ -128,9 +128,9 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
128 fp = popen( (const char *) cmd, "r"); 128 fp = popen( (const char *) cmd, "r");
129 if ( !fp ) { 129 if ( fp == NULL ) {
130 qDebug("Could not execute '" + cmd + "'! err=%d", fp); 130 qDebug("Could not execute '" + cmd + "'! err=%d", fp);
131 pclose(fp);
132 out("\nError while executing "+ cmd+"\n\n"); 131 out("\nError while executing "+ cmd+"\n\n");
133 return false; 132 ret = false;
134 } else { 133 } else {
135 while ( fgets( line, sizeof line, fp)) { 134 while ( fgets( line, sizeof line, fp) != NULL)
135 {
136 lineStr = line; 136 lineStr = line;
@@ -138,4 +138,3 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
138 //Configuring opie-oipkg...Done 138 //Configuring opie-oipkg...Done
139 if (lineStr.contains("Done")) 139 if (lineStr.contains("Done")) ret = true;
140 ret = true;
141 if (lineStr!=lineStrOld) 140 if (lineStr!=lineStrOld)
@@ -145,4 +144,4 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
145 } 144 }
146 pclose(fp);
147 } 145 }
146 pclose(fp);
148#endif 147#endif
@@ -236,4 +235,4 @@ void PmIpkg::processLinkDir( QString file, QString dest )
236 { 235 {
237 const char *instFile = strdup( (file).ascii() ); 236 const char *instFile = strdup( (file).latin1() );
238 const char *linkFile = strdup( (destFile).ascii()); 237 const char *linkFile = strdup( (destFile).latin1());
239 if( linkOpp==createLink ) 238 if( linkOpp==createLink )
@@ -244,3 +243,3 @@ void PmIpkg::processLinkDir( QString file, QString dest )
244 } else { 243 } else {
245 const char *linkFile = strdup( (destFile).ascii()); 244 const char *linkFile = strdup( (destFile).latin1());
246 if( linkOpp==removeLink ) 245 if( linkOpp==removeLink )
@@ -355,2 +354,16 @@ void PmIpkg::install()
355 qDebug("install loop %i of %i installing %s",i,to_install.count(),to_install.at(i)->installName().latin1()); //pvDebug 354 qDebug("install loop %i of %i installing %s",i,to_install.count(),to_install.at(i)->installName().latin1()); //pvDebug
355 if (to_install.at(i)->link())
356 {
357 // hack to have package.list
358 // in "dest"/usr/lib/ipkg/info/
359 QString rds = settings->getDestinationUrlByName("root");
360 QString lds = settings->getDestinationUrlByName(to_install.at(i)->dest());
361 QString listFile = "usr/lib/ipkg/lists/"+to_install.at(i)->name()+".list";
362 rds += listFile;
363 lds += listFile;
364 const char *rd = rds.latin1();
365 const char *ld = lds.latin1();
366 pvDebug(4, "linking: "+rds+" -> "+lds );
367 symlink( rd, ld );
368 }
356 if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() )) 369 if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() ))