Diffstat (limited to 'noncore/settings/aqpkg/ipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp index 34999ad..08ae386 100644 --- a/noncore/settings/aqpkg/ipkg.cpp +++ b/noncore/settings/aqpkg/ipkg.cpp | |||
@@ -1,64 +1,76 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | ipkg.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Sat Aug 31 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #include <fstream> | 30 | #include <fstream> |
19 | #include <iostream> | 31 | #include <iostream> |
20 | #include <vector> | 32 | #include <vector> |
21 | using namespace std; | 33 | using namespace std; |
22 | 34 | ||
23 | #include <stdio.h> | 35 | #include <stdio.h> |
24 | #include <unistd.h> | 36 | #include <unistd.h> |
25 | 37 | ||
26 | #ifdef QWS | 38 | #ifdef QWS |
27 | #include <qpe/qpeapplication.h> | 39 | #include <qpe/qpeapplication.h> |
28 | #else | 40 | #else |
29 | #include <qapplication.h> | 41 | #include <qapplication.h> |
30 | #endif | 42 | #endif |
31 | #include <qdir.h> | 43 | #include <qdir.h> |
32 | #include <qtextstream.h> | 44 | #include <qtextstream.h> |
33 | 45 | ||
34 | #include <opie/oprocess.h> | 46 | #include <opie/oprocess.h> |
35 | 47 | ||
36 | #include "utils.h" | 48 | #include "utils.h" |
37 | #include "ipkg.h" | 49 | #include "ipkg.h" |
38 | #include "global.h" | 50 | #include "global.h" |
39 | 51 | ||
40 | Ipkg :: Ipkg() | 52 | Ipkg :: Ipkg() |
41 | { | 53 | { |
42 | proc = 0; | 54 | proc = 0; |
43 | } | 55 | } |
44 | 56 | ||
45 | Ipkg :: ~Ipkg() | 57 | Ipkg :: ~Ipkg() |
46 | { | 58 | { |
47 | } | 59 | } |
48 | 60 | ||
49 | // Option is what we are going to do - install, upgrade, download, reinstall | 61 | // Option is what we are going to do - install, upgrade, download, reinstall |
50 | // package is the package name to install - either a fully qualified path and ipk | 62 | // package is the package name to install - either a fully qualified path and ipk |
51 | // file (if stored locally) or just the name of the package (for a network package) | 63 | // file (if stored locally) or just the name of the package (for a network package) |
52 | // packageName is the package name - (for a network package this will be the same as | 64 | // packageName is the package name - (for a network package this will be the same as |
53 | // package parameter) | 65 | // package parameter) |
54 | // dest is the destination alias (from ipk.conf) | 66 | // dest is the destination alias (from ipk.conf) |
55 | // destDir is the dir that the destination alias points to (used to link to root) | 67 | // destDir is the dir that the destination alias points to (used to link to root) |
56 | // flags is the ipkg options flags | 68 | // flags is the ipkg options flags |
57 | // dir is the directory to run ipkg in (defaults to "") | 69 | // dir is the directory to run ipkg in (defaults to "") |
58 | void Ipkg :: runIpkg() | 70 | void Ipkg :: runIpkg() |
59 | { | 71 | { |
60 | error = false; | 72 | error = false; |
61 | QStringList commands; | 73 | QStringList commands; |
62 | 74 | ||
63 | QDir::setCurrent( "/tmp" ); | 75 | QDir::setCurrent( "/tmp" ); |
64 | 76 | ||