-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp index d5157eb..f8513e4 100644 --- a/noncore/settings/aqpkg/ipkg.cpp +++ b/noncore/settings/aqpkg/ipkg.cpp | |||
@@ -56,25 +56,25 @@ bool Ipkg :: runIpkg( ) | |||
56 | 56 | ||
57 | QDir::setCurrent( "/tmp" ); | 57 | QDir::setCurrent( "/tmp" ); |
58 | QString cmd = ""; | 58 | QString cmd = ""; |
59 | 59 | ||
60 | if ( runtimeDir != "" ) | 60 | if ( runtimeDir != "" ) |
61 | { | 61 | { |
62 | cmd += "cd "; | 62 | cmd += "cd "; |
63 | cmd += runtimeDir; | 63 | cmd += runtimeDir; |
64 | cmd += " ; "; | 64 | cmd += " ; "; |
65 | } | 65 | } |
66 | cmd += "ipkg"; | 66 | cmd += "ipkg"; |
67 | 67 | ||
68 | if ( option != "update" && option != "download" ) | 68 | if ( option != "update" && option != "download" && option != "upgrade" ) |
69 | { | 69 | { |
70 | cmd += " -dest "+ destination; | 70 | cmd += " -dest "+ destination; |
71 | cmd += " -force-defaults"; | 71 | cmd += " -force-defaults"; |
72 | 72 | ||
73 | if ( flags & FORCE_DEPENDS ) | 73 | if ( flags & FORCE_DEPENDS ) |
74 | cmd += " -force-depends"; | 74 | cmd += " -force-depends"; |
75 | if ( flags & FORCE_REINSTALL ) | 75 | if ( flags & FORCE_REINSTALL ) |
76 | cmd += " -force-reinstall"; | 76 | cmd += " -force-reinstall"; |
77 | if ( flags & FORCE_REMOVE ) | 77 | if ( flags & FORCE_REMOVE ) |
78 | cmd += " -force-removal-of-essential-packages"; | 78 | cmd += " -force-removal-of-essential-packages"; |
79 | if ( flags & FORCE_OVERWRITE ) | 79 | if ( flags & FORCE_OVERWRITE ) |
80 | cmd += " -force-overwrite"; | 80 | cmd += " -force-overwrite"; |
@@ -88,45 +88,49 @@ bool Ipkg :: runIpkg( ) | |||
88 | // to root already. | 88 | // to root already. |
89 | if ( destDir == "/" ) | 89 | if ( destDir == "/" ) |
90 | flags ^= MAKE_LINKS; | 90 | flags ^= MAKE_LINKS; |
91 | } | 91 | } |
92 | 92 | ||
93 | } | 93 | } |
94 | 94 | ||
95 | #ifdef X86 | 95 | #ifdef X86 |
96 | cmd += " -f "; | 96 | cmd += " -f "; |
97 | cmd += IPKG_CONF; | 97 | cmd += IPKG_CONF; |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | cmd += " " + option + " " + package + " 2>&1"; | 100 | cmd += " " + option; |
101 | if ( option != "upgrade" ) | ||
102 | cmd += " " + package; | ||
103 | cmd += " 2>&1"; | ||
101 | 104 | ||
102 | qApp->processEvents(); | 105 | qApp->processEvents(); |
103 | 106 | ||
104 | // If we are removing packages and make links option is selected | 107 | // If we are removing packages and make links option is selected |
105 | // create the links | 108 | // create the links |
106 | if ( option == "remove" ) | 109 | if ( option == "remove" ) |
107 | { | 110 | { |
108 | createLinks = false; | 111 | createLinks = false; |
109 | if ( flags & MAKE_LINKS ) | 112 | if ( flags & MAKE_LINKS ) |
110 | { | 113 | { |
111 | emit outputText( QString( "Removing symbolic links...\n" ) ); | 114 | emit outputText( QString( "Removing symbolic links...\n" ) ); |
112 | linkPackage( Utils::getPackageNameFromIpkFilename( package ), destination, destDir ); | 115 | linkPackage( Utils::getPackageNameFromIpkFilename( package ), destination, destDir ); |
113 | } | 116 | } |
114 | } | 117 | } |
115 | 118 | ||
116 | emit outputText( cmd ); | 119 | emit outputText( cmd ); |
117 | 120 | ||
118 | // Execute command | 121 | // Execute command |
119 | dependantPackages = new QList<QString>; | 122 | dependantPackages = new QList<QString>; |
120 | dependantPackages->setAutoDelete( true ); | 123 | dependantPackages->setAutoDelete( true ); |
124 | |||
121 | ret = executeIpkgCommand( cmd, option ); | 125 | ret = executeIpkgCommand( cmd, option ); |
122 | 126 | ||
123 | if ( option == "install" ) | 127 | if ( option == "install" ) |
124 | { | 128 | { |
125 | // If we are not removing packages and make links option is selected | 129 | // If we are not removing packages and make links option is selected |
126 | // create the links | 130 | // create the links |
127 | createLinks = true; | 131 | createLinks = true; |
128 | if ( flags & MAKE_LINKS ) | 132 | if ( flags & MAKE_LINKS ) |
129 | { | 133 | { |
130 | emit outputText( " " ); | 134 | emit outputText( " " ); |
131 | emit outputText( QString( "Creating symbolic links for " )+ package ); | 135 | emit outputText( QString( "Creating symbolic links for " )+ package ); |
132 | 136 | ||