summaryrefslogtreecommitdiff
authordrw <drw>2005-02-16 17:22:19 (UTC)
committer drw <drw>2005-02-16 17:22:19 (UTC)
commit4556ab6dffdaf9108899a7a1f74d83f54ac4e91a (patch) (side-by-side diff)
tree70fe735502f0a31d7193621c482b9fafb6bbe006
parent7dd436c9a45c1fbd5d57f97bc786d0badc0ef5e5 (diff)
downloadopie-4556ab6dffdaf9108899a7a1f74d83f54ac4e91a.zip
opie-4556ab6dffdaf9108899a7a1f74d83f54ac4e91a.tar.gz
opie-4556ab6dffdaf9108899a7a1f74d83f54ac4e91a.tar.bz2
Fixed stupid bug where last package in status file was not shown as installed when it should be, and removed some printfs
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/ChangeLog7
-rw-r--r--noncore/settings/packagemanager/oipkg.cpp12
-rw-r--r--noncore/settings/packagemanager/opackagemanager.cpp7
3 files changed, 16 insertions, 10 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,2 +1,7 @@
+2005-02-16 Dan Williams <drw@handhelds.org>
+
+ * Fixed stupid bug where last package in status file was not shown as installed when it should be
+ * Removed printf's
+
2005-01-02 Dan Williams <drw@handhelds.org>
@@ -5,5 +10,5 @@
* Implement package in OIpkg (removed from InstallDlg) as this is ipkg specific
* Many small code tweaks
-
+
2004-12-21 Dan Williams <drw@handhelds.org>
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
@@ -364,4 +364,8 @@ OPackageList *OIpkg::installedPackages( const QString &destName, const QString &
f.close();
+ // Make sure to add to list last entry
+ if ( !name.isNull() && status.contains( " installed" ) )
+ pl->append( new OPackage( name, QString::null, version, QString::null, destName ) );
+
return pl;
}
@@ -454,5 +458,5 @@ bool OIpkg::executeCommand( OPackage::Command command, const QStringList &parame
// Get list of destinations for unlinking of packages not installed to root
OConfItemList *destList = destinations();
-
+
for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
{
@@ -646,5 +650,5 @@ void OIpkg::linkPackageDir( const QString &dest )
{
OConfItem *destConfItem = findConfItem( OConfItem::Destination, dest );
-
+
emit signalIpkgMessage( tr( "Linking packages installed in: %1" ).arg( dest ) );
@@ -690,5 +694,5 @@ void OIpkg::linkPackageDir( const QString &dest )
if ( fileInfo.isSymLink() && !fileInfo.readLink().isEmpty() )
linkFile = fileInfo.readLink();
-
+
// See if directory exists in 'root', if not, create
fileInfo.setFile( linkDest );
@@ -734,5 +738,5 @@ void OIpkg::unlinkPackage( const QString &package, OConfItemList *destList )
.arg( package );
//emit signalIpkgMessage( QString( "Looking for '%1'" ).arg ( destInfoFileName ) );
-
+
// If found and destination is not 'root', remove symbolic links
if ( QFile::exists( destInfoFileName ) && dest->name() != "root" )
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
@@ -84,8 +84,7 @@ void OPackageManager::loadAvailablePackages()
// Load package info
- if ( !m_packages.find( package->name() ) ) {
- printf( "ADD AVAILABLE '%s'\n", package->name().latin1());
+ if ( !m_packages.find( package->name() ) )
m_packages.insert( package->name(), package );
- } else
+ else
{
// If new package is newer version, replace existing package
@@ -140,5 +139,4 @@ void OPackageManager::loadInstalledPackages()
qApp->processEvents();
- printf( "DESGTINATION %s\n", destination->name().latin1());
OPackageList *packageList = m_ipkg.installedPackages( destination->name(),
destination->value() );
@@ -160,5 +158,4 @@ void OPackageManager::loadInstalledPackages()
{
// Package isn't in a current feed, add to list
- printf( "ADD INSTALLED '%s'\n", package->name().latin1());
m_packages.insert( package->name(), package );