summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/global.h2
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp10
-rw-r--r--noncore/settings/aqpkg/server.cpp8
3 files changed, 18 insertions, 2 deletions
diff --git a/noncore/settings/aqpkg/global.h b/noncore/settings/aqpkg/global.h
index 96ab46c..a4363b4 100644
--- a/noncore/settings/aqpkg/global.h
+++ b/noncore/settings/aqpkg/global.h
@@ -17,9 +17,9 @@
17 17
18#ifndef __GLOBAL_H 18#ifndef __GLOBAL_H
19#define __GLOBAL_H 19#define __GLOBAL_H
20 20
21#define VERSION_TEXT "AQPkg Version 0.7" 21#define VERSION_TEXT "AQPkg Version 0.8"
22 22
23// Uncomment the below line to run on a Linux box rather than a Zaurus 23// Uncomment the below line to run on a Linux box rather than a Zaurus
24// box this allows you to change where root is, and where to load config files from 24// box this allows you to change where root is, and where to load config files from
25// #define X86 25// #define X86
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index 3d06aef..dee834e 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -516,8 +516,9 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
516 516
517 // If the package has a filename then it is a local file 517 // If the package has a filename then it is a local file
518 if ( p->isPackageStoredLocally() ) 518 if ( p->isPackageStoredLocally() )
519 name = p->getFilename(); 519 name = p->getFilename();
520
520 QString option; 521 QString option;
521 QString dest = "root"; 522 QString dest = "root";
522 if ( !p->isInstalled() ) 523 if ( !p->isInstalled() )
523 { 524 {
@@ -529,9 +530,13 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
529 else 530 else
530 { 531 {
531 InstallData item; 532 InstallData item;
532 item.option = "D"; 533 item.option = "D";
534 if ( !p->isPackageStoredLocally() )
533 item.packageName = p->getInstalledPackageName(); 535 item.packageName = p->getInstalledPackageName();
536 else
537 item.packageName = name;
538
534 if ( p->getInstalledTo() ) 539 if ( p->getInstalledTo() )
535 { 540 {
536 item.destination = p->getInstalledTo(); 541 item.destination = p->getInstalledTo();
537 cout << "dest - " << p->getInstalledTo()->getDestinationName() << endl; 542 cout << "dest - " << p->getInstalledTo()->getDestinationName() << endl;
@@ -543,8 +548,13 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
543 } 548 }
544 549
545 // Now see if version is newer or not 550 // Now see if version is newer or not
546 int val = compareVersions( p->getInstalledVersion(), p->getVersion() ); 551 int val = compareVersions( p->getInstalledVersion(), p->getVersion() );
552
553 // If the version requested is older and user selected a local ipk file, then reinstall the file
554 if ( p->isPackageStoredLocally() && val == -1 )
555 val = 0;
556
547 if ( val == -2 ) 557 if ( val == -2 )
548 { 558 {
549 // Error - should handle 559 // Error - should handle
550 } 560 }
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp
index 8bca892..539ebf0 100644
--- a/noncore/settings/aqpkg/server.cpp
+++ b/noncore/settings/aqpkg/server.cpp
@@ -109,9 +109,10 @@ void Server :: readLocalIpks( Server *local )
109 // OK, we have a local IPK file, I think the standard naming conventions 109 // OK, we have a local IPK file, I think the standard naming conventions
110 // for these are packagename_version_arm.ipk 110 // for these are packagename_version_arm.ipk
111 QString file = (*it)->file(); 111 QString file = (*it)->file();
112 112
113 QString packageName = Utils::getPackageNameFromIpkFilename( file ); 113 // Changed to display the filename (excluding the path)
114 QString packageName = Utils::getFilenameFromIpkFilename( file );
114 QString ver = Utils::getPackageVersionFromIpkFilename( file ); 115 QString ver = Utils::getPackageVersionFromIpkFilename( file );
115 packageList.push_back( Package( packageName ) ); 116 packageList.push_back( Package( packageName ) );
116 packageList.back().setVersion( ver ); 117 packageList.back().setVersion( ver );
117 packageList.back().setFilename( file ); 118 packageList.back().setFilename( file );
@@ -226,8 +227,13 @@ void Server :: buildLocalPackages( Server *local )
226{ 227{
227 for ( unsigned int i = 0 ; i < packageList.size() ; ++i ) 228 for ( unsigned int i = 0 ; i < packageList.size() ; ++i )
228 { 229 {
229 QString name = packageList[i].getPackageName(); 230 QString name = packageList[i].getPackageName();
231
232 // If the package name is an ipk name, then convert the filename to a package name
233 if ( name.find( ".ipk" ) != -1 )
234 name = Utils::getPackageNameFromIpkFilename( packageList[i].getFilename() );
235
230 if ( local ) 236 if ( local )
231 packageList[i].setLocalPackage( local->getPackage( name ) ); 237 packageList[i].setLocalPackage( local->getPackage( name ) );
232 else 238 else
233 packageList[i].setLocalPackage( 0 ); 239 packageList[i].setLocalPackage( 0 );