-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() | |||
134 | 134 | ||
135 | 135 | ||
136 | QString Package::installName() | 136 | QString Package::installName() |
137 | { | 137 | { |
138 | if (_useFileName) return _fileName; | 138 | if (_useFileName) return _fileName; |
139 | else return _name; | 139 | else return _name; |
140 | } | 140 | } |
141 | 141 | ||
142 | QString Package::packageName() | ||
143 | { | ||
144 | QString pn = installName(); | ||
145 | pn = pn.right(pn.length()-pn.findRev("/")); | ||
146 | pn = pn.left(pn.find("_")); | ||
147 | return pn; | ||
148 | } | ||
149 | |||
142 | bool Package::installed() | 150 | bool Package::installed() |
143 | { | 151 | { |
144 | if (_status.contains("installed")) | 152 | if (_status.contains("installed")) |
145 | { | 153 | { |
146 | if (_status.contains("not-installed")) | 154 | if (_status.contains("not-installed")) |
147 | { | 155 | { |
148 | _toProcess = true; | 156 | _toProcess = true; |
149 | return false; | 157 | 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 | |||
21 | Package( QString, PackageManagerSettings *s, QObject *parent=0, const char *name=0 ); | 21 | Package( QString, PackageManagerSettings *s, QObject *parent=0, const char *name=0 ); |
22 | Package( Package*s, QObject *parent=0, const char *name=0 ); | 22 | Package( Package*s, QObject *parent=0, const char *name=0 ); |
23 | 23 | ||
24 | void setValue( QString, QString ); | 24 | void setValue( QString, QString ); |
25 | void copyValues( Package* ); | 25 | void copyValues( Package* ); |
26 | 26 | ||
27 | QString name(); | 27 | QString name(); |
28 | QString installName(); | 28 | QString installName(); |
29 | QString packageName(); | ||
29 | bool installed(); | 30 | bool installed(); |
30 | bool otherInstalled(); | 31 | bool otherInstalled(); |
31 | 32 | ||
32 | void setDesc( QString ); | 33 | void setDesc( QString ); |
33 | QString shortDesc(); | 34 | QString shortDesc(); |
34 | QString desc(); | 35 | QString desc(); |
35 | QString size(); | 36 | QString size(); |
36 | QString sizeUnits(); | 37 | 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() | |||
55 | bool PmIpkg::runIpkg(const QString& args, const QString& dest ) | 55 | bool PmIpkg::runIpkg(const QString& args, const QString& dest ) |
56 | { | 56 | { |
57 | bool ret=false; | 57 | bool ret=false; |
58 | QDir::setCurrent("/tmp"); | 58 | QDir::setCurrent("/tmp"); |
59 | QString cmd = "/usr/bin/ipkg "; | 59 | QString cmd = "/usr/bin/ipkg "; |
60 | #ifdef OPROCESS | 60 | #ifdef OPROCESS |
61 | ipkgProcess->clearArguments(); | 61 | ipkgProcess->clearArguments(); |
62 | *ipkgProcess << "/usr/bin/ipkg "; | 62 | *ipkgProcess << "/usr/bin/ipkg "; |
63 | QString cmd = ""; | 63 | cmd = ""; |
64 | #endif | 64 | #endif |
65 | pvDebug( 3,"PmIpkg::runIpkg got dest="+dest); | 65 | pvDebug( 3,"PmIpkg::runIpkg got dest="+dest); |
66 | if ( dest == "" ) | 66 | if ( dest == "" ) |
67 | cmd += " -dest "+settings->getDestinationName(); | 67 | cmd += " -dest "+settings->getDestinationName(); |
68 | else | 68 | else |
69 | cmd += " -dest "+ dest; | 69 | cmd += " -dest "+ dest; |
70 | 70 | ||
71 | cmd += " -force-defaults "; | 71 | cmd += " -force-defaults "; |
@@ -148,17 +148,18 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest ) | |||
148 | //out( "Finished!"); | 148 | //out( "Finished!"); |
149 | pvDebug(2,QString(ret?"success\n":"failure\n")); | 149 | pvDebug(2,QString(ret?"success\n":"failure\n")); |
150 | return ret; | 150 | return ret; |
151 | } | 151 | } |
152 | 152 | ||
153 | void PmIpkg::makeLinks(Package *pack) | 153 | void PmIpkg::makeLinks(Package *pack) |
154 | { | 154 | { |
155 | pvDebug( 2, "PmIpkg::makeLinks "+ pack->name()); | 155 | pvDebug( 2, "PmIpkg::makeLinks "+ pack->name()); |
156 | linkPackage( pack->name(), pack->dest() ); | 156 | QString pn = pack->name(); |
157 | linkPackage( pack->packageName(), pack->dest() ); | ||
157 | } | 158 | } |
158 | 159 | ||
159 | QStringList* PmIpkg::getList( QString packFileName, QString d ) | 160 | QStringList* PmIpkg::getList( QString packFileName, QString d ) |
160 | { | 161 | { |
161 | QString dest = settings->getDestinationUrlByName( d ); | 162 | QString dest = settings->getDestinationUrlByName( d ); |
162 | dest = dest==""?d:dest; | 163 | dest = dest==""?d:dest; |
163 | if (dest == "/" ) return 0; | 164 | if (dest == "/" ) return 0; |
164 | { | 165 | { |