author | tille <tille> | 2002-11-10 22:50:50 (UTC) |
---|---|---|
committer | tille <tille> | 2002-11-10 22:50:50 (UTC) |
commit | 9337c912158da3ad2fcda7ee1120c9357faddf8b (patch) (unidiff) | |
tree | c5800efad3f90cfc9901db0337039eb883c0cf28 /noncore/unsupported/oipkg/pmipkg.cpp | |
parent | f6cabaaa364ee6d894462c0902734e434715fc58 (diff) | |
download | opie-9337c912158da3ad2fcda7ee1120c9357faddf8b.zip opie-9337c912158da3ad2fcda7ee1120c9357faddf8b.tar.gz opie-9337c912158da3ad2fcda7ee1120c9357faddf8b.tar.bz2 |
here it's...
Diffstat (limited to 'noncore/unsupported/oipkg/pmipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 2ed313c..cfaadbf 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -109,17 +109,17 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest ) | |||
109 | qApp->processEvents(); | 109 | qApp->processEvents(); |
110 | } | 110 | } |
111 | } | 111 | } |
112 | pclose(fp); | 112 | pclose(fp); |
113 | pvDebug(2,QString(ret?"success\n":"failure\n")); | 113 | pvDebug(2,QString(ret?"success\n":"failure\n")); |
114 | return ret; | 114 | return ret; |
115 | } | 115 | } |
116 | 116 | ||
117 | void PmIpkg::makeLinks(Package *pack) | 117 | void PmIpkg::makeLinks(OipkgPackage *pack) |
118 | { | 118 | { |
119 | pvDebug( 2, "PmIpkg::makeLinks "+ pack->name()); | 119 | pvDebug( 2, "PmIpkg::makeLinks "+ pack->name()); |
120 | QString pn = pack->name(); | 120 | QString pn = pack->name(); |
121 | linkPackage( pack->packageName(), pack->dest() ); | 121 | linkPackage( pack->packageName(), pack->dest() ); |
122 | } | 122 | } |
123 | 123 | ||
124 | QStringList* PmIpkg::getList( QString packFileName, QString d ) | 124 | QStringList* PmIpkg::getList( QString packFileName, QString d ) |
125 | { | 125 | { |
@@ -227,17 +227,17 @@ void PmIpkg::processLinkDir( QString file, QString dest ) | |||
227 | unlink( linkFile ); | 227 | unlink( linkFile ); |
228 | } | 228 | } |
229 | } | 229 | } |
230 | } | 230 | } |
231 | } | 231 | } |
232 | 232 | ||
233 | void PmIpkg::loadList( PackageList *pl ) | 233 | void PmIpkg::loadList( PackageList *pl ) |
234 | { | 234 | { |
235 | for( Package *pack = pl->first();pack ; (pack = pl->next()) ) | 235 | for( OipkgPackage *pack = pl->first();pack ; (pack = pl->next()) ) |
236 | { | 236 | { |
237 | if ( pack && (pack->name() != "") && pack) | 237 | if ( pack && (pack->name() != "") && pack) |
238 | { | 238 | { |
239 | if ( pack->toInstall() ) | 239 | if ( pack->toInstall() ) |
240 | to_install.append( pack ); | 240 | to_install.append( pack ); |
241 | if ( pack->toRemove() ) | 241 | if ( pack->toRemove() ) |
242 | to_remove.append( pack ); | 242 | to_remove.append( pack ); |
243 | } | 243 | } |
@@ -286,17 +286,17 @@ void PmIpkg::doIt() | |||
286 | 286 | ||
287 | 287 | ||
288 | void PmIpkg::remove() | 288 | void PmIpkg::remove() |
289 | { | 289 | { |
290 | if ( to_remove.count() == 0 ) return; | 290 | if ( to_remove.count() == 0 ) return; |
291 | 291 | ||
292 | out(tr("Removing")+"\n"+tr("please wait")+"\n\n"); | 292 | out(tr("Removing")+"\n"+tr("please wait")+"\n\n"); |
293 | 293 | ||
294 | QStringList *fileList; | 294 | QStringList *fileList = new QStringList; |
295 | for (uint i=0; i < to_remove.count(); i++) | 295 | for (uint i=0; i < to_remove.count(); i++) |
296 | { | 296 | { |
297 | if ( to_remove.at(i)->link() ) fileList = getList( to_remove.at(i)->name(), to_remove.at(i)->dest() ); | 297 | if ( to_remove.at(i)->link() ) fileList = getList( to_remove.at(i)->name(), to_remove.at(i)->dest() ); |
298 | if ( runIpkg("remove " + to_remove.at(i)->installName(), to_remove.at(i)->dest() )) | 298 | if ( runIpkg("remove " + to_remove.at(i)->installName(), to_remove.at(i)->dest() )) |
299 | { | 299 | { |
300 | runwindow->progress->setProgress( 1 ); | 300 | runwindow->progress->setProgress( 1 ); |
301 | linkOpp = removeLink; | 301 | linkOpp = removeLink; |
302 | to_remove.at(i)->processed(); | 302 | to_remove.at(i)->processed(); |
@@ -409,30 +409,30 @@ void PmIpkg::show() | |||
409 | } | 409 | } |
410 | 410 | ||
411 | void PmIpkg::installFile(const QString &fileName, const QString &dest) | 411 | void PmIpkg::installFile(const QString &fileName, const QString &dest) |
412 | { | 412 | { |
413 | 413 | ||
414 | to_install.clear(); | 414 | to_install.clear(); |
415 | to_remove.clear(); | 415 | to_remove.clear(); |
416 | pvDebug( 2,"PmIpkg::installFile "+ fileName); | 416 | pvDebug( 2,"PmIpkg::installFile "+ fileName); |
417 | Package *p = new Package(fileName,settings); | 417 | OipkgPackage *p = new OipkgPackage(fileName,settings); |
418 | if ( dest!="") p->setDest( dest ); | 418 | if ( dest!="") p->setDest( dest ); |
419 | to_install.append( p ); | 419 | to_install.append( p ); |
420 | commit(); | 420 | commit(); |
421 | delete p; | 421 | delete p; |
422 | } | 422 | } |
423 | 423 | ||
424 | void PmIpkg::removeFile(const QString &fileName, const QString &dest) | 424 | void PmIpkg::removeFile(const QString &fileName, const QString &dest) |
425 | { | 425 | { |
426 | 426 | ||
427 | to_install.clear(); | 427 | to_install.clear(); |
428 | to_remove.clear(); | 428 | to_remove.clear(); |
429 | pvDebug( 2,"PmIpkg::removeFile "+ fileName); | 429 | pvDebug( 2,"PmIpkg::removeFile "+ fileName); |
430 | Package *p = new Package(fileName,settings); | 430 | OipkgPackage *p = new OipkgPackage(fileName,settings); |
431 | if ( dest!="") p->setDest( dest ); | 431 | if ( dest!="") p->setDest( dest ); |
432 | to_remove.append( p ); | 432 | to_remove.append( p ); |
433 | commit(); | 433 | commit(); |
434 | delete p; | 434 | delete p; |
435 | } | 435 | } |
436 | 436 | ||
437 | 437 | ||
438 | void PmIpkg::clearLists() | 438 | void PmIpkg::clearLists() |