author | andyq <andyq> | 2002-11-02 13:52:55 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-11-02 13:52:55 (UTC) |
commit | cf34849ac5c3eb9d16929cc88834973910209f74 (patch) (side-by-side diff) | |
tree | 06e189f927f88baeb16c927317153e1805a5f614 | |
parent | d21d693d91af8ee8fb54478a6db67f5a0590a767 (diff) | |
download | opie-cf34849ac5c3eb9d16929cc88834973910209f74.zip opie-cf34849ac5c3eb9d16929cc88834973910209f74.tar.gz opie-cf34849ac5c3eb9d16929cc88834973910209f74.tar.bz2 |
Handles upgrading of local ipk files better and the Local-IPKG view displays
the name of the file rather thanthe package name (so version can easily be seen)
-rw-r--r-- | noncore/settings/aqpkg/global.h | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 20 | ||||
-rw-r--r-- | noncore/settings/aqpkg/server.cpp | 8 |
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 @@ -20,3 +20,3 @@ -#define VERSION_TEXT "AQPkg Version 0.7"
+#define VERSION_TEXT "AQPkg Version 0.8"
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,5 +516,6 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) - // 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; @@ -526,3 +527,3 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) item.packageName = name; - return item; + return item; } @@ -532,3 +533,7 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) item.option = "D"; - item.packageName = p->getInstalledPackageName(); + if ( !p->isPackageStoredLocally() ) + item.packageName = p->getInstalledPackageName(); + else + item.packageName = name; + if ( p->getInstalledTo() ) @@ -546,2 +551,7 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) 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 @@ -112,3 +112,4 @@ void Server :: readLocalIpks( Server *local ) - QString packageName = Utils::getPackageNameFromIpkFilename( file ); + // Changed to display the filename (excluding the path) + QString packageName = Utils::getFilenameFromIpkFilename( file ); QString ver = Utils::getPackageVersionFromIpkFilename( file ); @@ -229,2 +230,7 @@ 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 ) |