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 /noncore/settings/aqpkg/networkpkgmgr.cpp | |
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)
Diffstat (limited to 'noncore/settings/aqpkg/networkpkgmgr.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ -512,43 +512,53 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) // Get package Server *s = dataMgr->getServer( serversList->currentText() ); Package *p = s->getPackage( name ); // If the package has a filename then it is a local file if ( p->isPackageStoredLocally() ) name = p->getFilename(); + QString option; QString dest = "root"; if ( !p->isInstalled() ) { InstallData item; item.option = "I"; item.packageName = name; return item; } else { InstallData item; item.option = "D"; + if ( !p->isPackageStoredLocally() ) item.packageName = p->getInstalledPackageName(); + else + item.packageName = name; + if ( p->getInstalledTo() ) { item.destination = p->getInstalledTo(); cout << "dest - " << p->getInstalledTo()->getDestinationName() << endl; cout << "dest - " << p->getInstalledTo()->getDestinationPath() << endl; } else { item.destination = p->getLocalPackage()->getInstalledTo(); } // 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 ) { // Error - should handle } else if ( val == -1 ) { // Version available is older - remove only item.option = "D"; |