-rw-r--r-- | noncore/settings/packagemanager/ChangeLog | 5 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkg.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/packagemanager/opackagemanager.cpp | 7 |
3 files changed, 11 insertions, 5 deletions
diff --git a/noncore/settings/packagemanager/ChangeLog b/noncore/settings/packagemanager/ChangeLog index 608cd98..38756b1 100644 --- a/noncore/settings/packagemanager/ChangeLog +++ b/noncore/settings/packagemanager/ChangeLog | |||
@@ -1,6 +1,11 @@ | |||
1 | 2005-02-16 Dan Williams <drw@handhelds.org> | ||
2 | |||
3 | * Fixed stupid bug where last package in status file was not shown as installed when it should be | ||
4 | * Removed printf's | ||
5 | |||
1 | 2005-01-02 Dan Williams <drw@handhelds.org> | 6 | 2005-01-02 Dan Williams <drw@handhelds.org> |
2 | 7 | ||
3 | * Released version 0.6.1 | 8 | * Released version 0.6.1 |
4 | * Implemented native package linking code to remove need for ipkg-link | 9 | * Implemented native package linking code to remove need for ipkg-link |
5 | * Implement package in OIpkg (removed from InstallDlg) as this is ipkg specific | 10 | * Implement package in OIpkg (removed from InstallDlg) as this is ipkg specific |
6 | * Many small code tweaks | 11 | * Many small code tweaks |
diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp index f2d7e39..e7e292e 100644 --- a/noncore/settings/packagemanager/oipkg.cpp +++ b/noncore/settings/packagemanager/oipkg.cpp | |||
@@ -360,12 +360,16 @@ OPackageList *OIpkg::installedPackages( const QString &destName, const QString & | |||
360 | else | 360 | else |
361 | line = t.readLine(); | 361 | line = t.readLine(); |
362 | } | 362 | } |
363 | 363 | ||
364 | f.close(); | 364 | f.close(); |
365 | 365 | ||
366 | // Make sure to add to list last entry | ||
367 | if ( !name.isNull() && status.contains( " installed" ) ) | ||
368 | pl->append( new OPackage( name, QString::null, version, QString::null, destName ) ); | ||
369 | |||
366 | return pl; | 370 | return pl; |
367 | } | 371 | } |
368 | 372 | ||
369 | OConfItem *OIpkg::findConfItem( OConfItem::Type type, const QString &name ) | 373 | OConfItem *OIpkg::findConfItem( OConfItem::Type type, const QString &name ) |
370 | { | 374 | { |
371 | // Find configuration item in list | 375 | // Find configuration item in list |
diff --git a/noncore/settings/packagemanager/opackagemanager.cpp b/noncore/settings/packagemanager/opackagemanager.cpp index ac16954..c9fdec1 100644 --- a/noncore/settings/packagemanager/opackagemanager.cpp +++ b/noncore/settings/packagemanager/opackagemanager.cpp | |||
@@ -80,16 +80,15 @@ void OPackageManager::loadAvailablePackages() | |||
80 | { | 80 | { |
81 | for ( OPackageListIterator packageIt( *packageList ); packageIt.current(); ++packageIt ) | 81 | for ( OPackageListIterator packageIt( *packageList ); packageIt.current(); ++packageIt ) |
82 | { | 82 | { |
83 | OPackage *package = packageIt.current(); | 83 | OPackage *package = packageIt.current(); |
84 | 84 | ||
85 | // Load package info | 85 | // Load package info |
86 | if ( !m_packages.find( package->name() ) ) { | 86 | if ( !m_packages.find( package->name() ) ) |
87 | printf( "ADD AVAILABLE '%s'\n", package->name().latin1()); | ||
88 | m_packages.insert( package->name(), package ); | 87 | m_packages.insert( package->name(), package ); |
89 | } else | 88 | else |
90 | { | 89 | { |
91 | // If new package is newer version, replace existing package | 90 | // If new package is newer version, replace existing package |
92 | OPackage *currPackage = m_packages[package->name()]; | 91 | OPackage *currPackage = m_packages[package->name()]; |
93 | if ( compareVersions( package->version(), currPackage->version() ) == 1 ) | 92 | if ( compareVersions( package->version(), currPackage->version() ) == 1 ) |
94 | m_packages.replace( package->name(), package ); | 93 | m_packages.replace( package->name(), package ); |
95 | } | 94 | } |
@@ -136,13 +135,12 @@ void OPackageManager::loadInstalledPackages() | |||
136 | status.append( destination->name() ); | 135 | status.append( destination->name() ); |
137 | emit statusText( status ); | 136 | emit statusText( status ); |
138 | ++destCount; | 137 | ++destCount; |
139 | emit statusBar( destCount ); | 138 | emit statusBar( destCount ); |
140 | qApp->processEvents(); | 139 | qApp->processEvents(); |
141 | 140 | ||
142 | printf( "DESGTINATION %s\n", destination->name().latin1()); | ||
143 | OPackageList *packageList = m_ipkg.installedPackages( destination->name(), | 141 | OPackageList *packageList = m_ipkg.installedPackages( destination->name(), |
144 | destination->value() ); | 142 | destination->value() ); |
145 | if ( packageList ) | 143 | if ( packageList ) |
146 | { | 144 | { |
147 | for ( OPackageListIterator packageIt( *packageList ); packageIt.current(); ++packageIt ) | 145 | for ( OPackageListIterator packageIt( *packageList ); packageIt.current(); ++packageIt ) |
148 | { | 146 | { |
@@ -156,13 +154,12 @@ void OPackageManager::loadInstalledPackages() | |||
156 | 154 | ||
157 | delete package; | 155 | delete package; |
158 | } | 156 | } |
159 | else | 157 | else |
160 | { | 158 | { |
161 | // Package isn't in a current feed, add to list | 159 | // Package isn't in a current feed, add to list |
162 | printf( "ADD INSTALLED '%s'\n", package->name().latin1()); | ||
163 | m_packages.insert( package->name(), package ); | 160 | m_packages.insert( package->name(), package ); |
164 | 161 | ||
165 | // Add category to list if it doesn't already exist | 162 | // Add category to list if it doesn't already exist |
166 | if ( m_categories.grep( package->category() ).isEmpty() ) | 163 | if ( m_categories.grep( package->category() ).isEmpty() ) |
167 | { | 164 | { |
168 | m_categories << package->category(); | 165 | m_categories << package->category(); |