-rw-r--r-- | noncore/settings/aqpkg/server.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp index 2cb0533..fc5ed12 100644 --- a/noncore/settings/aqpkg/server.cpp +++ b/noncore/settings/aqpkg/server.cpp | |||
@@ -71,72 +71,72 @@ void Server :: readStatusFile( vector<Destination> &destList ) | |||
71 | 71 | ||
72 | QString path = dit->getDestinationPath(); | 72 | QString path = dit->getDestinationPath(); |
73 | if ( path.right( 1 ) != "/" ) | 73 | if ( path.right( 1 ) != "/" ) |
74 | path += "/"; | 74 | path += "/"; |
75 | 75 | ||
76 | if ( path == "/" ) | 76 | if ( path == "/" ) |
77 | { | 77 | { |
78 | rootRead = true; | 78 | rootRead = true; |
79 | installingToRoot = true; | 79 | installingToRoot = true; |
80 | } | 80 | } |
81 | 81 | ||
82 | packageFile = path + "usr/lib/ipkg/status"; | 82 | packageFile = path + "usr/lib/ipkg/status"; |
83 | readPackageFile( 0, false, installingToRoot, &( *dit ) ); | 83 | readPackageFile( 0, false, installingToRoot, &( *dit ) ); |
84 | } | 84 | } |
85 | 85 | ||
86 | // Ensure that the root status file is read | 86 | // Ensure that the root status file is read |
87 | if ( !rootRead ) | 87 | if ( !rootRead ) |
88 | { | 88 | { |
89 | cout << "Reading status file " << "/usr/lib/ipkg/status" << endl; | 89 | cout << "Reading status file " << "/usr/lib/ipkg/status" << endl; |
90 | packageFile = "/usr/lib/ipkg/status"; | 90 | packageFile = "/usr/lib/ipkg/status"; |
91 | readPackageFile( 0, false, true ); | 91 | readPackageFile( 0, false, true ); |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | void Server :: readLocalIpks( Server *local ) | 95 | void Server :: readLocalIpks( Server *local ) |
96 | { | 96 | { |
97 | cleanUp(); | 97 | cleanUp(); |
98 | 98 | ||
99 | #ifdef QWS | 99 | #ifdef QWS |
100 | // First, get any local IPKGs in the documents area | 100 | // First, get any local IPKGs in the documents area |
101 | // Only applicable to Qtopie/Opie | 101 | // Only applicable to Qtopie/Opie |
102 | 102 | ||
103 | DocLnkSet files; | 103 | DocLnkSet files; |
104 | Global::findDocuments( &files, "application/ipkg" ); | 104 | Global::findDocuments( &files, "application/ipkg" ); |
105 | 105 | ||
106 | // Now add the items to the list | 106 | // Now add the items to the list |
107 | QListIterator<DocLnk> it( files.children() ); | 107 | QListIterator<DocLnk> it( files.children() ); |
108 | 108 | ||
109 | for ( ; it.current() ; ++it ) | 109 | for ( ; it.current() ; ++it ) |
110 | { | 110 | { |
111 | // OK, we have a local IPK file, I think the standard naming conventions | 111 | // OK, we have a local IPK file, I think the standard naming conventions |
112 | // for these are packagename_version_arm.ipk | 112 | // for these are packagename_version_arm.ipk |
113 | QString file = (*it)->file(); | 113 | QString file = (*it)->file(); |
114 | 114 | ||
115 | // Changed to display the filename (excluding the path) | 115 | // Changed to display the filename (excluding the path) |
116 | QString packageName = Utils::getFilenameFromIpkFilename( file ); | 116 | QString packageName = Utils::getFilenameFromIpkFilename( file ); |
117 | QString ver = Utils::getPackageVersionFromIpkFilename( file ); | 117 | QString ver = Utils::getPackageVersionFromIpkFilename( file ); |
118 | packageList.push_back( Package( packageName ) ); | 118 | packageList.push_back( Package( packageName ) ); |
119 | packageList.back().setVersion( ver ); | 119 | packageList.back().setVersion( ver ); |
120 | packageList.back().setFilename( file ); | 120 | packageList.back().setFilename( file ); |
121 | packageList.back().setPackageStoredLocally( true ); | 121 | packageList.back().setPackageStoredLocally( true ); |
122 | 122 | ||
123 | } | 123 | } |
124 | #else | 124 | #else |
125 | QString names[] = { "advancedfm_0.9.1-20020811_arm.ipk", "libopie_0.9.1-20020811_arm.ipk", "libopieobex_0.9.1-20020811.1_arm.ipk", "opie-addressbook_0.9.1-20020811_arm.ipk" }; | 125 | QString names[] = { "advancedfm_0.9.1-20020811_arm.ipk", "libopie_0.9.1-20020811_arm.ipk", "libopieobex_0.9.1-20020811.1_arm.ipk", "opie-addressbook_0.9.1-20020811_arm.ipk" }; |
126 | for ( int i = 0 ; i < 4 ; ++i ) | 126 | for ( int i = 0 ; i < 4 ; ++i ) |
127 | { | 127 | { |
128 | // OK, we have a local IPK file, I think the standard naming conventions | 128 | // OK, we have a local IPK file, I think the standard naming conventions |
129 | // for these are packagename_version_arm.ipk | 129 | // for these are packagename_version_arm.ipk |
130 | QString file = names[i]; | 130 | QString file = names[i]; |
131 | int p = file.find( "_" ); | 131 | int p = file.find( "_" ); |
132 | QString tmp = file.mid( 0, p ); | 132 | QString tmp = file.mid( 0, p ); |
133 | packageList.push_back( Package( tmp ) ); | 133 | packageList.push_back( Package( tmp ) ); |
134 | int p2 = file.find( "_", p+1 ); | 134 | int p2 = file.find( "_", p+1 ); |
135 | tmp = file.mid( p+1, p2-(p+1) ); | 135 | tmp = file.mid( p+1, p2-(p+1) ); |
136 | packageList.back().setVersion( tmp ); | 136 | packageList.back().setVersion( tmp ); |
137 | packageList.back().setPackageStoredLocally( true ); | 137 | packageList.back().setPackageStoredLocally( true ); |
138 | } | 138 | } |
139 | #endif | 139 | #endif |
140 | 140 | ||
141 | // build local packages | 141 | // build local packages |
142 | buildLocalPackages( local ); | 142 | buildLocalPackages( local ); |