summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager
Unidiff
Diffstat (limited to 'noncore/settings/packagemanager') (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,11 +1,16 @@
12005-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
12005-01-02 Dan Williams <drw@handhelds.org> 62005-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
7 12
82004-12-21 Dan Williams <drw@handhelds.org> 132004-12-21 Dan Williams <drw@handhelds.org>
9 14
10 * Released version 0.6.0 15 * Released version 0.6.0
11 * Added support for Ipkg 'src/gz' feeds 16 * Added support for Ipkg 'src/gz' feeds
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
@@ -362,8 +362,12 @@ OPackageList *OIpkg::installedPackages( const QString &destName, const QString &
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
369OConfItem *OIpkg::findConfItem( OConfItem::Type type, const QString &name ) 373OConfItem *OIpkg::findConfItem( OConfItem::Type type, const QString &name )
@@ -452,9 +456,9 @@ bool OIpkg::executeCommand( OPackage::Command command, const QStringList &parame
452 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); 456 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput );
453 457
454 // Get list of destinations for unlinking of packages not installed to root 458 // Get list of destinations for unlinking of packages not installed to root
455 OConfItemList *destList = destinations(); 459 OConfItemList *destList = destinations();
456 460
457 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) 461 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
458 { 462 {
459 unlinkPackage( (*it), destList ); 463 unlinkPackage( (*it), destList );
460 ipkg_packages_remove( &m_ipkgArgs, (*it), true ); 464 ipkg_packages_remove( &m_ipkgArgs, (*it), true );
@@ -644,9 +648,9 @@ void OIpkg::linkPackageDir( const QString &dest )
644{ 648{
645 if ( !dest.isNull() ) 649 if ( !dest.isNull() )
646 { 650 {
647 OConfItem *destConfItem = findConfItem( OConfItem::Destination, dest ); 651 OConfItem *destConfItem = findConfItem( OConfItem::Destination, dest );
648 652
649 emit signalIpkgMessage( tr( "Linking packages installed in: %1" ).arg( dest ) ); 653 emit signalIpkgMessage( tr( "Linking packages installed in: %1" ).arg( dest ) );
650 654
651 // Set package destination directory 655 // Set package destination directory
652 QString destDir = destConfItem->value(); 656 QString destDir = destConfItem->value();
@@ -688,9 +692,9 @@ void OIpkg::linkPackageDir( const QString &dest )
688 // If file installed file is actually symbolic link, use actual file for linking 692 // If file installed file is actually symbolic link, use actual file for linking
689 QFileInfo fileInfo( linkFile ); 693 QFileInfo fileInfo( linkFile );
690 if ( fileInfo.isSymLink() && !fileInfo.readLink().isEmpty() ) 694 if ( fileInfo.isSymLink() && !fileInfo.readLink().isEmpty() )
691 linkFile = fileInfo.readLink(); 695 linkFile = fileInfo.readLink();
692 696
693 // See if directory exists in 'root', if not, create 697 // See if directory exists in 'root', if not, create
694 fileInfo.setFile( linkDest ); 698 fileInfo.setFile( linkDest );
695 QString linkDestDirName = fileInfo.dirPath( true ); 699 QString linkDestDirName = fileInfo.dirPath( true );
696 QDir linkDestDir( linkDestDirName ); 700 QDir linkDestDir( linkDestDirName );
@@ -732,9 +736,9 @@ void OIpkg::unlinkPackage( const QString &package, OConfItemList *destList )
732 QString destInfoFileName = QString( "%1/%2/%3.list" ).arg( dest->value() ) 736 QString destInfoFileName = QString( "%1/%2/%3.list" ).arg( dest->value() )
733 .arg( IPKG_INFO_PATH ) 737 .arg( IPKG_INFO_PATH )
734 .arg( package ); 738 .arg( package );
735 //emit signalIpkgMessage( QString( "Looking for '%1'" ).arg ( destInfoFileName ) ); 739 //emit signalIpkgMessage( QString( "Looking for '%1'" ).arg ( destInfoFileName ) );
736 740
737 // If found and destination is not 'root', remove symbolic links 741 // If found and destination is not 'root', remove symbolic links
738 if ( QFile::exists( destInfoFileName ) && dest->name() != "root" ) 742 if ( QFile::exists( destInfoFileName ) && dest->name() != "root" )
739 { 743 {
740 QFile destInfoFile( destInfoFileName ); 744 QFile destInfoFile( destInfoFileName );
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
@@ -82,12 +82,11 @@ void OPackageManager::loadAvailablePackages()
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 )
@@ -138,9 +137,8 @@ void OPackageManager::loadInstalledPackages()
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 {
@@ -158,9 +156,8 @@ void OPackageManager::loadInstalledPackages()
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() )