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.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index de1f162..4a8a389 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -68,4 +68,5 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
68 QString cmd = "/usr/bin/ipkg "; 68 QString cmd = "/usr/bin/ipkg ";
69#ifdef OPROCESS 69#ifdef OPROCESS
70 ipkgProcess->kill();
70 ipkgProcess->clearArguments(); 71 ipkgProcess->clearArguments();
71 *ipkgProcess << "/usr/bin/ipkg "; 72 *ipkgProcess << "/usr/bin/ipkg ";
@@ -100,4 +101,6 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
100 101
101//debug 102//debug
103 delete ipkgProcess;
104 ipkgProcess = new OProcess();
102 ipkgProcess->clearArguments(); 105 ipkgProcess->clearArguments();
103 *ipkgProcess << "/bin/ls "; 106 *ipkgProcess << "/bin/ls ";
@@ -171,5 +174,5 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
171 QString dest = settings->getDestinationUrlByName( d ); 174 QString dest = settings->getDestinationUrlByName( d );
172 dest = dest==""?d:dest; 175 dest = dest==""?d:dest;
173 if (dest == "/" ) return 0; 176 // if (dest == "/" ) return 0;
174 { 177 {
175 Config cfg( "oipkg", Config::User ); 178 Config cfg( "oipkg", Config::User );
@@ -177,11 +180,17 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
177 QString statusDir = cfg.readEntry( "statusDir", "" ); 180 QString statusDir = cfg.readEntry( "statusDir", "" );
178 } 181 }
179 packFileName = dest+"/"+statusDir+"/info/"+packFileName+".list"; 182 QString packFileDir = dest+"/"+statusDir+"/info/"+packFileName+".list";
180 QFile f( packFileName ); 183 QFile f( packFileName );
181 if ( ! f.open(IO_ReadOnly) ) 184 if ( ! f.open(IO_ReadOnly) )
182 { 185 {
183 pvDebug(1," Panik! Could not open"); 186 out( "Could not open:\n"+packFileDir );
184 out( "Panik!\n Could not open:\n"+packFileName ); 187 f.close();
185 return (QStringList*)0; 188 packFileDir = "/"+statusDir+"/info/"+packFileName+".list";
189 f.setName( packFileDir );
190 if ( ! f.open(IO_ReadOnly) )
191 {
192 qDebug(" Panik! Could not open"+packFileDir);
193 out( "Could not open:\n"+packFileDir+"\n Panik!" );
194 }
186 } 195 }
187 QStringList *fileList = new QStringList(); 196 QStringList *fileList = new QStringList();
@@ -191,4 +200,5 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
191 *fileList += t.readLine(); 200 *fileList += t.readLine();
192 } 201 }
202 f.close();
193 return fileList; 203 return fileList;
194} 204}
@@ -196,4 +206,5 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
196void PmIpkg::linkPackage( QString packFileName, QString dest ) 206void PmIpkg::linkPackage( QString packFileName, QString dest )
197{ 207{
208 if (dest == "root" || dest == "/" ) return;
198 QStringList *fileList = getList( packFileName, dest ); 209 QStringList *fileList = getList( packFileName, dest );
199 processFileList( fileList, dest ); 210 processFileList( fileList, dest );