-rw-r--r-- | noncore/unsupported/oipkg/package.cpp | 8 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/package.h | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 5 |
3 files changed, 12 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp index 517b37a..8bbdd77 100644 --- a/noncore/unsupported/oipkg/package.cpp +++ b/noncore/unsupported/oipkg/package.cpp @@ -134,16 +134,24 @@ QString Package::name() QString Package::installName() { if (_useFileName) return _fileName; else return _name; } +QString Package::packageName() +{ + QString pn = installName(); + pn = pn.right(pn.length()-pn.findRev("/")); + pn = pn.left(pn.find("_")); + return pn; +} + bool Package::installed() { if (_status.contains("installed")) { if (_status.contains("not-installed")) { _toProcess = true; return false; diff --git a/noncore/unsupported/oipkg/package.h b/noncore/unsupported/oipkg/package.h index f50b9b5..0f76ece 100644 --- a/noncore/unsupported/oipkg/package.h +++ b/noncore/unsupported/oipkg/package.h @@ -21,16 +21,17 @@ class Package : public QObject Package( QString, PackageManagerSettings *s, QObject *parent=0, const char *name=0 ); Package( Package*s, QObject *parent=0, const char *name=0 ); void setValue( QString, QString ); void copyValues( Package* ); QString name(); QString installName(); + QString packageName(); bool installed(); bool otherInstalled(); void setDesc( QString ); QString shortDesc(); QString desc(); QString size(); QString sizeUnits(); diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 7d0e246..89309a2 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp @@ -55,17 +55,17 @@ PmIpkg::~PmIpkg() bool PmIpkg::runIpkg(const QString& args, const QString& dest ) { bool ret=false; QDir::setCurrent("/tmp"); QString cmd = "/usr/bin/ipkg "; #ifdef OPROCESS ipkgProcess->clearArguments(); *ipkgProcess << "/usr/bin/ipkg "; - QString cmd = ""; + cmd = ""; #endif pvDebug( 3,"PmIpkg::runIpkg got dest="+dest); if ( dest == "" ) cmd += " -dest "+settings->getDestinationName(); else cmd += " -dest "+ dest; cmd += " -force-defaults "; @@ -148,17 +148,18 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest ) //out( "Finished!"); pvDebug(2,QString(ret?"success\n":"failure\n")); return ret; } void PmIpkg::makeLinks(Package *pack) { pvDebug( 2, "PmIpkg::makeLinks "+ pack->name()); - linkPackage( pack->name(), pack->dest() ); + QString pn = pack->name(); + linkPackage( pack->packageName(), pack->dest() ); } QStringList* PmIpkg::getList( QString packFileName, QString d ) { QString dest = settings->getDestinationUrlByName( d ); dest = dest==""?d:dest; if (dest == "/" ) return 0; { |