author | tille <tille> | 2002-07-05 12:05:38 (UTC) |
---|---|---|
committer | tille <tille> | 2002-07-05 12:05:38 (UTC) |
commit | a332e5e111b0c9ef8eb0836876a4ff386c660514 (patch) (unidiff) | |
tree | fe327e0daace261a53d69a28c99355d63ce9012a | |
parent | 1ba879b2be7ad4ae390a351922bd476474d5dce7 (diff) | |
download | opie-a332e5e111b0c9ef8eb0836876a4ff386c660514.zip opie-a332e5e111b0c9ef8eb0836876a4ff386c660514.tar.gz opie-a332e5e111b0c9ef8eb0836876a4ff386c660514.tar.bz2 |
fixed linking bug
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 4a8a389..d29036b 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -167,43 +167,46 @@ void PmIpkg::makeLinks(Package *pack) | |||
167 | pvDebug( 2, "PmIpkg::makeLinks "+ pack->name()); | 167 | pvDebug( 2, "PmIpkg::makeLinks "+ pack->name()); |
168 | QString pn = pack->name(); | 168 | QString pn = pack->name(); |
169 | linkPackage( pack->packageName(), pack->dest() ); | 169 | linkPackage( pack->packageName(), pack->dest() ); |
170 | } | 170 | } |
171 | 171 | ||
172 | QStringList* PmIpkg::getList( QString packFileName, QString d ) | 172 | QStringList* PmIpkg::getList( QString packFileName, QString d ) |
173 | { | 173 | { |
174 | QString dest = settings->getDestinationUrlByName( d ); | 174 | QString dest = settings->getDestinationUrlByName( d ); |
175 | dest = dest==""?d:dest; | 175 | dest = dest==""?d:dest; |
176 | // if (dest == "/" ) return 0; | 176 | // if (dest == "/" ) return 0; |
177 | { | 177 | { |
178 | Config cfg( "oipkg", Config::User ); | 178 | Config cfg( "oipkg", Config::User ); |
179 | cfg.setGroup( "Common" ); | 179 | cfg.setGroup( "Common" ); |
180 | QString statusDir = cfg.readEntry( "statusDir", "" ); | 180 | QString statusDir = cfg.readEntry( "statusDir", "" ); |
181 | } | 181 | } |
182 | QString packFileDir = dest+"/"+statusDir+"/info/"+packFileName+".list"; | 182 | QString packFileDir = dest+"/"+statusDir+"/info/"+packFileName+".list"; |
183 | QFile f( packFileName ); | 183 | QFile f( packFileDir ); |
184 | qDebug("Try to open %s", packFileDir.latin1()); | ||
184 | if ( ! f.open(IO_ReadOnly) ) | 185 | if ( ! f.open(IO_ReadOnly) ) |
185 | { | 186 | { |
186 | out( "Could not open:\n"+packFileDir ); | 187 | out( "Could not open:\n"+packFileDir ); |
187 | f.close(); | 188 | f.close(); |
188 | packFileDir = "/"+statusDir+"/info/"+packFileName+".list"; | 189 | packFileDir = "/"+statusDir+"/info/"+packFileName+".list"; |
189 | f.setName( packFileDir ); | 190 | f.setName( packFileDir ); |
191 | qDebug("Try to open %s", packFileDir.latin1()); | ||
190 | if ( ! f.open(IO_ReadOnly) ) | 192 | if ( ! f.open(IO_ReadOnly) ) |
191 | { | 193 | { |
192 | qDebug(" Panik! Could not open"+packFileDir); | 194 | qDebug(" Panik! Could not open"+packFileDir); |
193 | out( "Could not open:\n"+packFileDir+"\n Panik!" ); | 195 | out( "Could not open:\n"+packFileDir+"\n Panik!" ); |
196 | return (QStringList*)0; | ||
194 | } | 197 | } |
195 | } | 198 | } |
196 | QStringList *fileList = new QStringList(); | 199 | QStringList *fileList = new QStringList(); |
197 | QTextStream t( &f ); | 200 | QTextStream t( &f ); |
198 | while ( !t.eof() ) | 201 | while ( !t.eof() ) |
199 | { | 202 | { |
200 | *fileList += t.readLine(); | 203 | *fileList += t.readLine(); |
201 | } | 204 | } |
202 | f.close(); | 205 | f.close(); |
203 | return fileList; | 206 | return fileList; |
204 | } | 207 | } |
205 | 208 | ||
206 | void PmIpkg::linkPackage( QString packFileName, QString dest ) | 209 | void PmIpkg::linkPackage( QString packFileName, QString dest ) |
207 | { | 210 | { |
208 | if (dest == "root" || dest == "/" ) return; | 211 | if (dest == "root" || dest == "/" ) return; |
209 | QStringList *fileList = getList( packFileName, dest ); | 212 | QStringList *fileList = getList( packFileName, dest ); |