summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/global.h2
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp20
-rw-r--r--noncore/settings/aqpkg/server.cpp8
3 files changed, 23 insertions, 7 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
@@ -19,5 +19,5 @@
#define __GLOBAL_H
-#define VERSION_TEXT "AQPkg Version 0.7"
+#define VERSION_TEXT "AQPkg Version 0.8"
// Uncomment the below line to run on a Linux box rather than a Zaurus
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
@@ -515,7 +515,8 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
Package *p = s->getPackage( name );
- // If the package has a filename then it is a local file
- if ( p->isPackageStoredLocally() )
- name = p->getFilename();
+ // If the package has a filename then it is a local file
+ if ( p->isPackageStoredLocally() )
+ name = p->getFilename();
+
QString option;
QString dest = "root";
@@ -525,5 +526,5 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
item.option = "I";
item.packageName = name;
- return item;
+ return item;
}
else
@@ -531,5 +532,9 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
InstallData item;
item.option = "D";
- item.packageName = p->getInstalledPackageName();
+ if ( !p->isPackageStoredLocally() )
+ item.packageName = p->getInstalledPackageName();
+ else
+ item.packageName = name;
+
if ( p->getInstalledTo() )
{
@@ -545,4 +550,9 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
// Now see if version is newer or not
int val = compareVersions( p->getInstalledVersion(), p->getVersion() );
+
+ // If the version requested is older and user selected a local ipk file, then reinstall the file
+ if ( p->isPackageStoredLocally() && val == -1 )
+ val = 0;
+
if ( val == -2 )
{
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
@@ -111,5 +111,6 @@ void Server :: readLocalIpks( Server *local )
QString file = (*it)->file();
- QString packageName = Utils::getPackageNameFromIpkFilename( file );
+ // Changed to display the filename (excluding the path)
+ QString packageName = Utils::getFilenameFromIpkFilename( file );
QString ver = Utils::getPackageVersionFromIpkFilename( file );
packageList.push_back( Package( packageName ) );
@@ -228,4 +229,9 @@ void Server :: buildLocalPackages( Server *local )
{
QString name = packageList[i].getPackageName();
+
+ // If the package name is an ipk name, then convert the filename to a package name
+ if ( name.find( ".ipk" ) != -1 )
+ name = Utils::getPackageNameFromIpkFilename( packageList[i].getFilename() );
+
if ( local )
packageList[i].setLocalPackage( local->getPackage( name ) );