-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 @@ | |||
8 | * install to dest with click on packet | 8 | * install to dest with click on packet |
9 | * qcop | ||
9 | * error handling | 10 | * 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 @@ | |||
9 | #include <qpe/resource.h> | 9 | #include <qpe/resource.h> |
10 | #include <qpe/config.h> | ||
10 | #include <qpe/stringutil.h> | 11 | #include <qpe/stringutil.h> |
@@ -25,2 +26,5 @@ | |||
25 | 26 | ||
27 | #define PARSE_FILELIST | ||
28 | // #define IPKG_FILELIST | ||
29 | |||
26 | PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) | 30 | PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) |
@@ -54,3 +58,3 @@ int PmIpkg::runIpkg(const QString& args) | |||
54 | 58 | ||
55 | out( "Starting to "+ args+"<br>\n"); | 59 | out( "<hr><br>Starting to "+ args+"<br>\n"); |
56 | cmd += args; | 60 | cmd += args; |
@@ -68,2 +72,3 @@ int PmIpkg::runIpkg(const QString& args) | |||
68 | cmd += " | tee "+redirect+" 2>&1"; | 72 | cmd += " | tee "+redirect+" 2>&1"; |
73 | pvDebug(2, "running >"+cmd+"<"); | ||
69 | r = system(cmd.latin1()); | 74 | r = system(cmd.latin1()); |
@@ -87,10 +92,26 @@ int PmIpkg::runIpkg(const QString& args) | |||
87 | 92 | ||
88 | void PmIpkg::makeLinks(QString file) | 93 | void PmIpkg::makeLinks(QString pack) |
89 | { | 94 | { |
95 | pvDebug( 2, "PmIpkg::makeLinks "+ pack); | ||
90 | out( "<br>creating links<br>" ); | 96 | out( "<br>creating links<br>" ); |
91 | QString dest = settings->getDestinationUrl(); | 97 | QString dest = settings->getDestinationUrl(); |
92 | out("for package "+file+" in "+dest+"<br>"); | 98 | out("for package "+pack+" in "+dest+"<br>"); |
93 | system(("ipkg -d "+dest+" files "+file+"> /tmp/oipkg.pipe 2>&1").latin1()); | 99 | #ifdef IPKG_FILELIST |
100 | system(("ipkg -d "+dest+" files "+pack+"> /tmp/oipkg.pipe 2>&1").latin1()); | ||
94 | QFile f( "/tmp/oipkg.pipe" ); | 101 | QFile f( "/tmp/oipkg.pipe" ); |
95 | while ( ! f.open(IO_ReadOnly) ) {}; | 102 | while ( ! f.open(IO_ReadOnly) ) {}; |
103 | #endif | ||
104 | #ifdef PARSE_FILELIST | ||
105 | { | ||
106 | Config cfg( "oipkg", Config::User ); | ||
107 | cfg.setGroup( "Common" ); | ||
108 | QString statusDir = cfg.readEntry( "statusDir", "" ); | ||
109 | } | ||
110 | QString fn = dest+"/"+statusDir+"/info/"+pack+".list"; | ||
111 | QFile f( fn ); | ||
112 | if ( ! f.open(IO_ReadOnly) ) | ||
113 | { | ||
114 | out( "<b>Panik!</b> Could not open:<br>"+fn ); | ||
115 | }; | ||
116 | #endif | ||
96 | QTextStream t( &f ); | 117 | QTextStream t( &f ); |
@@ -107,3 +128,10 @@ void PmIpkg::processLinkDir( QString file, QString dest ) | |||
107 | { | 128 | { |
129 | |||
130 | #ifdef PARSE_FILELIST | ||
131 | QString destFile = file; | ||
132 | file = dest+"/"+file; | ||
133 | #endif | ||
134 | #ifdef IPKG_FILELIST | ||
108 | QString destFile = file.right( file.length() - dest.length() ); | 135 | QString destFile = file.right( file.length() - dest.length() ); |
136 | #endif | ||
109 | QFileInfo fileInfo( file ); | 137 | QFileInfo fileInfo( file ); |