author | tille <tille> | 2002-07-20 12:09:24 (UTC) |
---|---|---|
committer | tille <tille> | 2002-07-20 12:09:24 (UTC) |
commit | 8c335cfdfffede8b7a864566ec4d9507a2978684 (patch) (unidiff) | |
tree | 6d346457a20b32597bf4fc54c7f3cca8f49ea060 | |
parent | ce7ca2ca68be48bee2661fcfeedb06faccd51408 (diff) | |
download | opie-8c335cfdfffede8b7a864566ec4d9507a2978684.zip opie-8c335cfdfffede8b7a864566ec4d9507a2978684.tar.gz opie-8c335cfdfffede8b7a864566ec4d9507a2978684.tar.bz2 |
missing space
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index a7deb8f..11c0f97 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -1,96 +1,96 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | * This program is free software; you can redistribute it and/or modify * |
4 | * it under the terms of the GNU General Public License as published by * | 4 | * it under the terms of the GNU General Public License as published by * |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * (at your option) any later version. * | 6 | * (at your option) any later version. * |
7 | * * | 7 | * * |
8 | ***************************************************************************/ | 8 | ***************************************************************************/ |
9 | // (c) 2002 Patrick S. Vogt <tille@handhelds.org> | 9 | // (c) 2002 Patrick S. Vogt <tille@handhelds.org> |
10 | #include "pmipkg.h" | 10 | #include "pmipkg.h" |
11 | #include "pksettings.h" | 11 | #include "pksettings.h" |
12 | #include "package.h" | 12 | #include "package.h" |
13 | #include "packagelistitem.h" | 13 | #include "packagelistitem.h" |
14 | 14 | ||
15 | //#include <opie/oprocess.h> | 15 | //#include <opie/oprocess.h> |
16 | #include <qpe/resource.h> | 16 | #include <qpe/resource.h> |
17 | #include <qpe/config.h> | 17 | #include <qpe/config.h> |
18 | #include <qpe/stringutil.h> | 18 | #include <qpe/stringutil.h> |
19 | #include <qpe/qpeapplication.h> | 19 | #include <qpe/qpeapplication.h> |
20 | #include <qdir.h> | 20 | #include <qdir.h> |
21 | #include <qfile.h> | 21 | #include <qfile.h> |
22 | #include <qgroupbox.h> | 22 | #include <qgroupbox.h> |
23 | #include <qmultilineedit.h> | 23 | #include <qmultilineedit.h> |
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qcheckbox.h> | 25 | #include <qcheckbox.h> |
26 | #include <qtextstream.h> | 26 | #include <qtextstream.h> |
27 | #include <qtextview.h> | 27 | #include <qtextview.h> |
28 | #include <qmessagebox.h> | 28 | #include <qmessagebox.h> |
29 | #include <qprogressbar.h> | 29 | #include <qprogressbar.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | 32 | ||
33 | #include <stdlib.h> | 33 | #include <stdlib.h> |
34 | #include <unistd.h> | 34 | #include <unistd.h> |
35 | 35 | ||
36 | #include "mainwindow.h" | 36 | #include "mainwindow.h" |
37 | 37 | ||
38 | 38 | ||
39 | 39 | ||
40 | PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) | 40 | PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) |
41 | : QObject ( p ) | 41 | : QObject ( p ) |
42 | { | 42 | { |
43 | settings = s; | 43 | settings = s; |
44 | runwindow = new RunWindow( p, name, true, f ); | 44 | runwindow = new RunWindow( p, name, true, f ); |
45 | 45 | ||
46 | Config cfg( "oipkg", Config::User ); | 46 | Config cfg( "oipkg", Config::User ); |
47 | cfg.setGroup( "ipkg" ); | 47 | cfg.setGroup( "ipkg" ); |
48 | ipkg_cmd = cfg.readEntry( "cmd", "ipkg" ); | 48 | ipkg_cmd = cfg.readEntry( "cmd", "ipkg" )+" "; |
49 | } | 49 | } |
50 | 50 | ||
51 | PmIpkg::~PmIpkg() | 51 | PmIpkg::~PmIpkg() |
52 | { | 52 | { |
53 | } | 53 | } |
54 | 54 | ||
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 = ipkg_cmd; | 59 | QString cmd = ipkg_cmd; |
60 | pvDebug( 3,"PmIpkg::runIpkg got dest="+dest); | 60 | pvDebug( 3,"PmIpkg::runIpkg got dest="+dest); |
61 | if (!args.contains("update")) | 61 | if (!args.contains("update")) |
62 | { | 62 | { |
63 | if ( dest == "" ) | 63 | if ( dest == "" ) |
64 | cmd += " -dest "+settings->getDestinationName(); | 64 | cmd += " -dest "+settings->getDestinationName(); |
65 | else | 65 | else |
66 | cmd += " -dest "+ dest; | 66 | cmd += " -dest "+ dest; |
67 | 67 | ||
68 | cmd += " -force-defaults "; | 68 | cmd += " -force-defaults "; |
69 | 69 | ||
70 | if ( installDialog && installDialog->_force_depends ) | 70 | if ( installDialog && installDialog->_force_depends ) |
71 | { | 71 | { |
72 | if (installDialog->_force_depends->isChecked()) | 72 | if (installDialog->_force_depends->isChecked()) |
73 | cmd += " -force-depends "; | 73 | cmd += " -force-depends "; |
74 | if (installDialog->_force_reinstall->isChecked()) | 74 | if (installDialog->_force_reinstall->isChecked()) |
75 | cmd += " -force-reinstall "; | 75 | cmd += " -force-reinstall "; |
76 | if (installDialog->_force_remove->isChecked()) | 76 | if (installDialog->_force_remove->isChecked()) |
77 | cmd += " -force-removal-of-essential-packages "; | 77 | cmd += " -force-removal-of-essential-packages "; |
78 | } | 78 | } |
79 | } //!args.contains("update") | 79 | } //!args.contains("update") |
80 | 80 | ||
81 | out( "Starting to "+ args+"\n"); | 81 | out( "Starting to "+ args+"\n"); |
82 | qApp->processEvents(); | 82 | qApp->processEvents(); |
83 | cmd += args; | 83 | cmd += args; |
84 | out( "running:\n"+cmd+"\n" ); | 84 | out( "running:\n"+cmd+"\n" ); |
85 | pvDebug(2,"running:"+cmd); | 85 | pvDebug(2,"running:"+cmd); |
86 | qApp->processEvents(); | 86 | qApp->processEvents(); |
87 | FILE *fp; | 87 | FILE *fp; |
88 | char line[130]; | 88 | char line[130]; |
89 | QString lineStr, lineStrOld; | 89 | QString lineStr, lineStrOld; |
90 | sleep(1); | 90 | sleep(1); |
91 | cmd +=" 2>&1"; | 91 | cmd +=" 2>&1"; |
92 | fp = popen( (const char *) cmd, "r"); | 92 | fp = popen( (const char *) cmd, "r"); |
93 | if ( fp == NULL ) { | 93 | if ( fp == NULL ) { |
94 | qDebug("Could not execute '" + cmd + "'! err=%d", fp); | 94 | qDebug("Could not execute '" + cmd + "'! err=%d", fp); |
95 | out("\nError while executing "+ cmd+"\n\n"); | 95 | out("\nError while executing "+ cmd+"\n\n"); |
96 | ret = false; | 96 | ret = false; |